diff --git a/molecule/mysql_hardening/verify_tasks/mysql_users.yml b/molecule/mysql_hardening/verify_tasks/mysql_users.yml index f08cb78b..392c8dad 100644 --- a/molecule/mysql_hardening/verify_tasks/mysql_users.yml +++ b/molecule/mysql_hardening/verify_tasks/mysql_users.yml @@ -37,7 +37,6 @@ ansible.builtin.assert: that: - '"role_keep@" in mysql_users_list' - login_unix_socket: "{{ login_unix_socket | default(omit) }}" when: - mysql_role_support.rowcount[0] > 0 diff --git a/roles/mysql_hardening/tasks/mysql_secure_installation.yml b/roles/mysql_hardening/tasks/mysql_secure_installation.yml index 387eac07..889c98df 100644 --- a/roles/mysql_hardening/tasks/mysql_secure_installation.yml +++ b/roles/mysql_hardening/tasks/mysql_secure_installation.yml @@ -66,7 +66,7 @@ AND USER NOT IN ('mysql.sys', 'mysqlxsys', 'mariadb.sys') - {{ 'AND is_role COLLATE utf8mb4_general_ci = "N"' if mysql_role_support.rowcount[0] > 0 }}; + {{ 'AND convert(is_role USING utf8) = "N"' if mysql_role_support.rowcount[0] > 0 }}; login_unix_socket: "{{ login_unix_socket | default(omit) }}" register: mysql_users_wo_passwords_or_auth_string check_mode: false