From f1bbdf9e9ae52920f937c616903b09462c9dca4b Mon Sep 17 00:00:00 2001 From: andanotheruser Date: Wed, 13 Nov 2024 07:11:24 +0100 Subject: [PATCH] make no_log configurable (#228) --- defaults/main.yml | 3 +++ tasks/configure_root_access.yml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index d5ade5e..35646e9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -322,3 +322,6 @@ galera_enable_cacti_monitoring: false # Define the cacti user info for cacti db monitoring - If used. May remove later. cacti_db_password: "cactiuser" cacti_db_user: "cactiuser" + +# Whether to output user data when managing users. +galera_users_no_log: true diff --git a/tasks/configure_root_access.yml b/tasks/configure_root_access.yml index 7b70283..dc1077f 100644 --- a/tasks/configure_root_access.yml +++ b/tasks/configure_root_access.yml @@ -6,7 +6,7 @@ name: "root" password: "{{ mariadb_mysql_root_password }}" become: true - no_log: true + no_log: "{{ galera_users_no_log | bool }}" ignore_errors: true run_once: true retries: 6 @@ -25,7 +25,7 @@ group: "root" mode: "u=rw,g=,o=" become: true - no_log: true + no_log: "{{ galera_users_no_log | bool }}" - name: configure_root_access | updating root passwords (allow from anywhere) community.mysql.mysql_user: @@ -35,7 +35,7 @@ password: "{{ mariadb_mysql_root_password }}" priv: "*.*:ALL,GRANT" become: true - no_log: true + no_log: "{{ galera_users_no_log | bool }}" run_once: true retries: 6 delay: 5