From 92e6cad463266ad44abdc9c2bb9d4af2f31c5703 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Wed, 22 Mar 2023 17:39:59 +0100 Subject: [PATCH] try to fix IS_ROLE Signed-off-by: Sebastian Gumprich --- roles/mysql_hardening/tasks/mysql_secure_installation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mysql_hardening/tasks/mysql_secure_installation.yml b/roles/mysql_hardening/tasks/mysql_secure_installation.yml index 99e23fc7..ce993bd1 100644 --- a/roles/mysql_hardening/tasks/mysql_secure_installation.yml +++ b/roles/mysql_hardening/tasks/mysql_secure_installation.yml @@ -49,7 +49,7 @@ - name: Get all users that have no authentication_string on MySQL version >= 5.7.6 or Mariadb version >= 10.4.0 community.mysql.mysql_query: query: > - SELECT CONCAT(QUOTE(USER), '@', QUOTE(HOST)) AS USER + SELECT CONCAT(QUOTE(USER), '@', QUOTE(HOST)) AS user FROM mysql.user u LEFT JOIN INFORMATION_SCHEMA.COLUMNS c ON c.TABLE_SCHEMA = 'mysql' AND c.TABLE_NAME = 'user' @@ -74,7 +74,7 @@ - name: Get all users that have no password or authentication_string on MySQL version < 5.7.6 or Mariadb version < 10.4.0 community.mysql.mysql_query: query: > - SELECT CONCAT(QUOTE(USER), '@', QUOTE(HOST)) AS USER + SELECT CONCAT(QUOTE(USER), '@', QUOTE(HOST)) AS user FROM mysql.user WHERE (length(password)=0 OR password="")