Hide sensitive data - #43 related

- Add new variable (default: false) to enable debugging (show sensitive
data)
- Set true when working with Vagrant
pull/45/merge
Emilien Mantel 2021-09-01 12:24:40 +02:00
parent ae5cb68a8e
commit 860b212ee0
6 changed files with 14 additions and 2 deletions

View File

@ -60,6 +60,10 @@ Check "priv" syntax in [mysql\_user module documentation](http://docs.ansible.co
- `mariadb_version`: depends Debian version
- `mariadb_repository`: MariaDB upstream APT repository (see: [MariaDB repositories tool](https://downloads.mariadb.org/mariadb/repositories))
### Other
- `mariadb_debug_role`: boolean, set true to disable no_log hidding
Dependencies
------------

4
Vagrantfile vendored
View File

@ -56,7 +56,7 @@ Vagrant.configure("2") do |config|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars].merge({ is_docker: true })
ansible.extra_vars = opts[:vars].merge({ mariadb_debug_role: true, is_docker: true })
ansible.groups = { opts[:groups][0] => name }
end
end
@ -78,7 +78,7 @@ Vagrant.configure("2") do |config|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars].merge({ is_docker: false })
ansible.extra_vars = opts[:vars].merge({ mariadb_debug_role: true, is_docker: false })
ansible.groups = { opts[:groups][0] => name }
end
end

View File

@ -131,3 +131,8 @@ mariadb_wsrep_node_address: false # Set primary node IP
mariadb_galera_members: []
mariadb_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
mariadb_wsrep_stt_method: 'rsync'
# -------------------------------------
# Debug
# -------------------------------------
mariadb_debug_role: false

View File

@ -65,3 +65,4 @@
host_all: "{{ item.host_all | default(omit) }}"
state: present
loop: "{{ mariadb_users }}"
no_log: "{{ not mariadb_debug_role }}"

View File

@ -11,6 +11,7 @@
master_port: "{{ mariadb_replication_port }}"
master_user: "{{ mariadb_replication_user }}"
master_password: "{{ mariadb_replication_password }}"
no_log: "{{ not mariadb_debug_role }}"
# -- Wait this PR in Ansible released version (https://github.com/ansible/ansible/pull/62648)
# name: MYSQL_REPLICATION | Setup replication with GTID

View File

@ -11,6 +11,7 @@
master_port: "{{ mariadb_replication_port }}"
master_user: "{{ mariadb_replication_user }}"
master_password: "{{ mariadb_replication_password }}"
no_log: "{{ not mariadb_debug_role }}"
- name: MYSQL_REPLICATION | Change master
mysql_replication: