From 37fa66a836835da53f875980516d490da49df9e2 Mon Sep 17 00:00:00 2001 From: Felix Hamme Date: Thu, 28 Apr 2022 14:00:05 +0200 Subject: [PATCH] mysql_user and mysql_role: log some updated privileges; explain integration test blind spot --- plugins/module_utils/user.py | 2 +- tests/integration/targets/test_mysql_user/tasks/test_privs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/user.py b/plugins/module_utils/user.py index 07117a8..a029d82 100644 --- a/plugins/module_utils/user.py +++ b/plugins/module_utils/user.py @@ -336,7 +336,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted, grant_privs.extend(curr_priv[db_table]) if len(grant_privs) + len(revoke_privs) > 0: - msg = "Privileges updated" + msg = "Privileges updated: granted %s, revoked %s" % (grant_privs, revoke_privs) if module.check_mode: return (True, msg) if len(revoke_privs) > 0: diff --git a/tests/integration/targets/test_mysql_user/tasks/test_privs.yml b/tests/integration/targets/test_mysql_user/tasks/test_privs.yml index 89d9358..68025ac 100644 --- a/tests/integration/targets/test_mysql_user/tasks/test_privs.yml +++ b/tests/integration/targets/test_mysql_user/tasks/test_privs.yml @@ -173,7 +173,7 @@ state: present register: result - # FIXME: on mariadb 10.5 there's always a change + # FIXME: on mariadb >=10.5.2 there's always a change because the REPLICATION CLIENT privilege was renamed to BINLOG MONITOR - name: Assert that priv did not change assert: that: