Do not log the passwords.

This commit is contained in:
Andrea Dell'Amico 2025-02-07 14:22:52 +01:00
parent 9062878cd1
commit ed5bb1dc27
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 6 additions and 2 deletions

View File

@ -6,13 +6,14 @@
host: "{{ item }}"
password: "{{ mysql_root_password }}"
login_unix_socket: "{{ mysql_socket }}"
no_log: true
when: mysql_root_password is defined
loop:
- 127.0.0.1
- ::1
- '{{ ansible_hostname }}'
- localhost
ignore_errors: true
# ignore_errors: true
tags: ['mysql', 'mysql_root']
- name: configure_root_access | Secure the mysql root user when no password has been defined
@ -27,7 +28,8 @@
- ::1
- '{{ ansible_hostname }}'
- localhost
ignore_errors: true
no_log: true
# ignore_errors: true
tags: ['mysql', 'mysql_root']
- name: configure_root_access | Install the .my.cnf file with root password credentials

View File

@ -6,6 +6,7 @@
encoding: "{{ item.encoding }}"
state: present
login_unix_socket: "{{ mysql_socket }}"
no_log: true
with_items: '{{ mysql_db_data | default([]) }}'
when: item.name is defined
tags: ['mysql', 'mysql_db']
@ -32,6 +33,7 @@
priv: "{{ item.0.name }}.*:{{ item.0.additional_privs }}"
state: present
login_unix_socket: "{{ mysql_socket }}"
no_log: true
with_subelements:
- '{{ mysql_db_data | default([]) }}'
- allowed_hosts