From 093fe79e17ea945e328a641ea59b3ccc2c569000 Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Fri, 15 Sep 2023 09:17:06 +0200 Subject: [PATCH] add missing option (forgotten in previous commit) --- plugins/module_utils/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/user.py b/plugins/module_utils/user.py index e959e5f..eabbeff 100644 --- a/plugins/module_utils/user.py +++ b/plugins/module_utils/user.py @@ -114,7 +114,7 @@ def get_grants(cursor, user, host): return grants.split(", ") -def get_existing_authentication(cursor, user): +def get_existing_authentication(cursor, user, host): # Return the plugin and auth_string if there is exactly one distinct existing plugin and auth_string. if get_server_type(cursor) == 'mariadb': @@ -158,7 +158,7 @@ def user_add(cursor, user, host, host_all, password, encrypted, used_existing_password = False if reuse_existing_password: - existing_auth = get_existing_authentication(cursor, user) + existing_auth = get_existing_authentication(cursor, user, host) if existing_auth: plugin = existing_auth['plugin'] plugin_hash_string = existing_auth['auth_string']