From 86aa4aa5e4ef567ab2dd2ac5bff908b9c2fd01d8 Mon Sep 17 00:00:00 2001 From: Joshua Hoffmann Date: Thu, 24 Oct 2024 11:46:03 +0200 Subject: [PATCH] make no_log configurable --- 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..44ca2d3 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: false 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