From 06ee720195ad7a74ac1f3943e0ee75a267468821 Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Tue, 8 Jul 2025 07:52:58 +0100 Subject: [PATCH 1/2] Update proxysql_mysql_users.py add comment to user --- plugins/modules/proxysql_mysql_users.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/modules/proxysql_mysql_users.py b/plugins/modules/proxysql_mysql_users.py index dd50347..ceee859 100644 --- a/plugins/modules/proxysql_mysql_users.py +++ b/plugins/modules/proxysql_mysql_users.py @@ -24,6 +24,11 @@ description: - Password of the user connecting to the mysqld or ProxySQL instance. type: str + comment: + description: + - A helpful comment. + type: str + required: false encrypt_password: description: - Encrypt a cleartext password passed in the I(password) option, using @@ -129,6 +134,7 @@ salt: 'secrets_of_20_chars_' state: present load_to_runtime: false + comment: this is a test # This example removes a user, saves the mysql user config to disk, and # dynamically loads the mysql user config to runtime. It uses credentials @@ -164,6 +170,7 @@ transaction_persistent: 0 use_ssl: 0 username: guest_ro + comment: this is a test username: guest_ro ''' @@ -229,7 +236,8 @@ def __init__(self, module): "default_schema", "transaction_persistent", "fast_forward", - "max_connections" + "max_connections", + "comment" ] self.config_data = dict((k, module.params[k]) @@ -445,7 +453,8 @@ def main(): state=dict(default='present', choices=['present', 'absent']), save_to_disk=dict(default=True, type='bool'), - load_to_runtime=dict(default=True, type='bool') + load_to_runtime=dict(default=True, type='bool'), + comment=dict(type='str') ) module = AnsibleModule( From ff6e2833f43c2128f25db589793d143b57d73bcb Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Wed, 9 Jul 2025 13:13:37 +0100 Subject: [PATCH 2/2] Apply suggestion from @Andersson007 Co-authored-by: Andrew Klychkov --- plugins/modules/proxysql_mysql_users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/modules/proxysql_mysql_users.py b/plugins/modules/proxysql_mysql_users.py index ceee859..cca8028 100644 --- a/plugins/modules/proxysql_mysql_users.py +++ b/plugins/modules/proxysql_mysql_users.py @@ -28,7 +28,8 @@ description: - A helpful comment. type: str - required: false + required: false + version_added: '1.7.0' encrypt_password: description: - Encrypt a cleartext password passed in the I(password) option, using