Hide passwords better

Do not show passwords in misc ansible outputs

Change-Id: I9c5f3023dbac1a9409d83341790df2a6f5d82179
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2020-04-07 15:02:52 +02:00
parent 3ed3739f04
commit a88a3d6953
3 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,7 @@
os_password: "{{ lookup('env', 'OS_PASSWORD') }}"
os_project_name: "{{ lookup('env', 'OS_PROJECT_NAME') }}"
run_once: true
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
tasks:
- name: crate container and upload templates
@ -57,6 +58,7 @@
--os-project-name "{{ os_project_name }}"
--auth-version "{{ auth_version }}"
post "{{ container }}" --header 'x-container-meta-usage-tripleo:plan'
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
- name: Create temp directory
tempfile:

View File

@ -85,10 +85,12 @@
- name: Set mysql root password
set_fact:
MysqlRootPassword: "{{ (tripleo_undercloud_passwords['content'] | b64decode | from_yaml)['parameter_defaults']['MysqlRootPassword'] }}"
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
rescue:
- name: Set mysql root password (fallback)
set_fact:
MysqlRootPassword: "{{ lookup('ini', 'undercloud_mysql_root_password section=auth file=' ~ ansible_home ~ '/undercloud-passwords.conf') }}"
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
- name: Create the names for the temporary backup files
set_fact:

View File

@ -20,6 +20,7 @@
hiera -c '{{ tripleo_backup_and_restore_hiera_config_file }}' 'mysql::server::root_password'
when: mysql_password is undefined
register: mysql_password
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
become: true
tags:
- bar_create_recover_image
@ -75,6 +76,7 @@
when: mysql_password.stderr is defined
tags:
- bar_create_recover_image
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
- name: MySQL BBDDs backup
shell: |
@ -87,6 +89,7 @@
when: mysql_password.stderr is defined
tags:
- bar_create_recover_image
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
- name: Pause mysql.
command: "{{ tripleo_container_cli }} pause {{ tripleo_backup_and_restore_mysql_container }}"