Added no_log

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-15 23:18:44 +02:00
parent cb2b9462e1
commit 5b64b47754
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
4 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@
docker exec --user root {{ espocrm_name }} docker exec --user root {{ espocrm_name }}
sed -i "s/'password' => .*/'password' => '{{ database_password }}',/" {{ espocrm_config_file }} sed -i "s/'password' => .*/'password' => '{{ database_password }}',/" {{ espocrm_config_file }}
notify: docker compose restart notify: docker compose restart
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
- name: Ensure siteUrl matches canonical domain - name: Ensure siteUrl matches canonical domain
ansible.builtin.shell: | ansible.builtin.shell: |

View File

@ -2,15 +2,19 @@
command: > command: >
docker exec --user root {{ matomo_name }} docker exec --user root {{ matomo_name }}
sed -i "s/^host *=.*/host = {{ database_host }}/" {{ matomo_config }} sed -i "s/^host *=.*/host = {{ database_host }}/" {{ matomo_config }}
- name: Update DB name - name: Update DB name
command: > command: >
docker exec --user root {{ matomo_name }} docker exec --user root {{ matomo_name }}
sed -i "s/^dbname *=.*/dbname = {{ database_name }}/" {{ matomo_config }} sed -i "s/^dbname *=.*/dbname = {{ database_name }}/" {{ matomo_config }}
- name: Update DB user - name: Update DB user
command: > command: >
docker exec --user root {{ matomo_name }} docker exec --user root {{ matomo_name }}
sed -i "s/^username *=.*/username = {{ database_username }}/" {{ matomo_config }} sed -i "s/^username *=.*/username = {{ database_username }}/" {{ matomo_config }}
- name: Update DB password - name: Update DB password
command: > command: >
docker exec --user root {{ matomo_name }} docker exec --user root {{ matomo_name }}
sed -i "s/^password *=.*/password = {{ database_password }}/" {{ matomo_config }} sed -i "s/^password *=.*/password = {{ database_password }}/" {{ matomo_config }}
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"

View File

@ -21,6 +21,7 @@
docker exec --user root {{ moodle_container }} docker exec --user root {{ moodle_container }}
sed -i "s/^\$CFG->dbpass *= *.*/\$CFG->dbpass = '{{ database_password }}';/" {{ moodle_config }} sed -i "s/^\$CFG->dbpass *= *.*/\$CFG->dbpass = '{{ database_password }}';/" {{ moodle_config }}
notify: docker compose restart notify: docker compose restart
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
- name: Update CFG->wwwroot via sed in container - name: Update CFG->wwwroot via sed in container
command: > command: >

View File

@ -23,6 +23,7 @@
docker exec --user root {{ wordpress_container }} docker exec --user root {{ wordpress_container }}
sed -i "s/define(\s*'DB_PASSWORD'\s*,\s*'[^']*'\s*);/define( 'DB_PASSWORD', '{{ database_password }}' );/i" {{ wordpress_docker_conf_path }} sed -i "s/define(\s*'DB_PASSWORD'\s*,\s*'[^']*'\s*);/define( 'DB_PASSWORD', '{{ database_password }}' );/i" {{ wordpress_docker_conf_path }}
notify: docker compose restart notify: docker compose restart
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
- name: "Flush handlers to reinitialize new database credentials" - name: "Flush handlers to reinitialize new database credentials"
meta: flush_handlers meta: flush_handlers