From ed6b9c8af6b7622e08fb104eb5486d4046c22de3 Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Wed, 20 Sep 2023 16:02:29 +0200 Subject: [PATCH] fix key for privileges in the output to match mysql_user input --- plugins/modules/mysql_info.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/mysql_info.py b/plugins/modules/mysql_info.py index 64e20d1c..4c1dbcac 100644 --- a/plugins/modules/mysql_info.py +++ b/plugins/modules/mysql_info.py @@ -201,7 +201,7 @@ "name": "user1", "host": "host.com", "plugin": "mysql_native_password", - "privs": "'db1.*': 'SELECT'/'db2.*': 'SELECT'", + "priv": "'db1.*': 'SELECT'/'db2.*': 'SELECT'", "resource_limits": { MAX_USER_CONNECTIONS: 100 } } engines: description: Information about the server's storage engines. @@ -516,12 +516,12 @@ def __get_users_privs(self): "users_privs": [ { "host": "users_privs.com", - "privs": "*.*: ALL,GRANT", + "priv": "*.*: ALL,GRANT", "user": "users_privs_adm" }, { "host": "users_privs.com", - "privs": "`mysql`.*: SELECT/`users_privs_db`.*: SELECT", + "priv": "`mysql`.*: SELECT/`users_privs_db`.*: SELECT", "user": "users_privs_multi" } ] @@ -571,7 +571,7 @@ def __get_users_privs(self): output_dict = { 'user': user, 'host': host, - 'privs': '/'.join(priv_string), + 'priv': '/'.join(priv_string), 'resource_limits': copy_ressource_limits, }