Browse Source

Merge "Hide passwords better"

tags/1.4.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
bd79e9e440
3 changed files with 7 additions and 0 deletions
  1. +2
    -0
      tripleo_ansible/playbooks/cli-create-deployment-plan.yaml
  2. +2
    -0
      tripleo_ansible/playbooks/cli-undercloud-backup.yaml
  3. +3
    -0
      tripleo_ansible/roles/backup_and_restore/tasks/db_backup.yml

+ 2
- 0
tripleo_ansible/playbooks/cli-create-deployment-plan.yaml 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:


+ 2
- 0
tripleo_ansible/playbooks/cli-undercloud-backup.yaml 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:


+ 3
- 0
tripleo_ansible/roles/backup_and_restore/tasks/db_backup.yml 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 }}"


Loading…
Cancel
Save