From 270217aa304e729eeec0ec9a03c3a309d157ec7d Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Fri, 15 Sep 2023 11:07:39 +0200 Subject: [PATCH] fix recreate user tasks using correct auth options --- .../test_mysql_info/tasks/filter_users_privs.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/integration/targets/test_mysql_info/tasks/filter_users_privs.yml b/tests/integration/targets/test_mysql_info/tasks/filter_users_privs.yml index 5205368..84675f1 100644 --- a/tests/integration/targets/test_mysql_info/tasks/filter_users_privs.yml +++ b/tests/integration/targets/test_mysql_info/tasks/filter_users_privs.yml @@ -152,20 +152,22 @@ - debug: var=result - - name: Insert the users privileges as input of mysql_user + - name: Recreate users from mysql_info users_privs result community.mysql.mysql_user: name: "{{ item.user }}" host: "{{ item.host }}" - password: "{{ item.password | default(omit) }}" - encrypted: "{{ item.encrypted | default(omit) }}" plugin: "{{ item.plugin | default(omit) }}" - plugin_auth_string: "{{ item.plugin_auth_string | default(omit) }}" - plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}" + plugin_auth_string: "{{ item.auth_string | default(omit) }}" tls_require: "{{ item.tls_require | default(omit) }}" priv: "{{ item.priv | default(omit) }}" resource_limits: "{{ item.resource_limits | default(omit) }}" state: present loop: "{{ result.users_privs }}" + loop_control: + label: "{{ item.user }}@{{ item.host }}" + register: recreate_users_result + failed_when: recreate_users_result is changed + # ================================== Cleanup ============================