Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'comment' parameter in 'proxysql_mysql_users' module #166

Open
BenMayden opened this issue Nov 6, 2024 · 1 comment
Open

Comments

@BenMayden
Copy link

SUMMARY

The "community.proxysql.proxysql_mysql_users" module does not support adding comment to the comment column of the mysql_users table.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.proxysql.proxysql_mysql_users

ADDITIONAL INFORMATION

The mysql_users table has a "comment" column, however, the "community.proxysql.proxysql_mysql_users" module does not support the comment parameter, and so it cannot add a comment to the comment column for a user.

- name: Add a user with a comment
  community.proxysql.proxysql_mysql_users:
    config_file: /some/file/path
    username: user
    password: secretpass
    comment: "Ansible Managed User" <--- This would be a useful parameter
    default_hostgroup: 1
    state: "{{ item.proxysql_state }}"
@matt-horwood-mayden
Copy link

comment is in the table structure (https://proxysql.com/documentation/main-runtime/#mysql_users)

mysql> SHOW CREATE TABLE mysql_users\G
*************************** 1. row ***************************
       table: mysql_users
Create Table: CREATE TABLE mysql_users (
    username VARCHAR NOT NULL,
    password VARCHAR,
    active INT CHECK (active IN (0,1)) NOT NULL DEFAULT 1,
    use_ssl INT CHECK (use_ssl IN (0,1)) NOT NULL DEFAULT 0,
    default_hostgroup INT NOT NULL DEFAULT 0,
    default_schema VARCHAR,
    schema_locked INT CHECK (schema_locked IN (0,1)) NOT NULL DEFAULT 0,
    transaction_persistent INT CHECK (transaction_persistent IN (0,1)) NOT NULL DEFAULT 1,
    fast_forward INT CHECK (fast_forward IN (0,1)) NOT NULL DEFAULT 0,
    backend INT CHECK (backend IN (0,1)) NOT NULL DEFAULT 1,
    frontend INT CHECK (frontend IN (0,1)) NOT NULL DEFAULT 1,
    max_connections INT CHECK (max_connections >=0) NOT NULL DEFAULT 10000,
    attributes VARCHAR CHECK (JSON_VALID(attributes) OR attributes = '') NOT NULL DEFAULT '',
    comment VARCHAR NOT NULL DEFAULT '',
    PRIMARY KEY (username, backend),
    UNIQUE (username, frontend))
1 row in set (0.00 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants