Collect and output outputs/passwords files with old and new locations
In Idded7faba1ff6c811b94503c559029aeeaca6a06, we are changing the default path for tripleo-undercloud-outputs.yaml and tripleo-undercloud-passwords.yaml. These tasks in CI that expect the files to exist at the old location are updated to use the first_found lookup to check both the old and new paths. Likewise, when the output files are written on the minion, they are written to both the old and new locations until the tripleoclient patch merges. Once the tripleoclient patch merges, we can update these tasks to only look at the new path. Partial-Bug: #1921975 Signed-off-by: James Slagle <jslagle@redhat.com> Change-Id: If28d5b225439162b7983165fe3bea605971cfb74
This commit is contained in:
@@ -19,10 +19,20 @@
|
||||
set_fact:
|
||||
undercloud_outputs: "{{ hostvars['undercloud']['undercloud_outputs'] }}"
|
||||
undercloud_passwords: "{{ hostvars['undercloud']['undercloud_passwords'] }}"
|
||||
- name: write output files
|
||||
- name: write output files to old consistent location
|
||||
include_role:
|
||||
name: undercloud-setup
|
||||
tasks_from: write-outputs
|
||||
- name: create new consistent location
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ working_dir ~ '/tripleo-deploy/minion' }}"
|
||||
- name: write output files to new consistent location
|
||||
include_role:
|
||||
name: undercloud-setup
|
||||
tasks_from: write-outputs
|
||||
vars:
|
||||
undercloud_outputs_dir: "{{ working_dir ~ '/tripleo-deploy/minion/' }}"
|
||||
tags:
|
||||
- undercloud-setup
|
||||
|
||||
|
@@ -3,13 +3,21 @@
|
||||
# their contents
|
||||
- name: Collect undercloud outputs
|
||||
slurp:
|
||||
src: "{{ working_dir }}/tripleo-undercloud-outputs.yaml"
|
||||
src: "{{ lookup('first_found', output_paths, errors='ignore') }}"
|
||||
register: tmp_undercloud_outputs
|
||||
vars:
|
||||
output_paths:
|
||||
- "{{ working_dir }}/tripleo-undercloud-outputs.yaml"
|
||||
- "{{ working_dir }}/tripleo-deploy/undercloud/tripleo-undercloud-outputs.yaml"
|
||||
|
||||
- name: Collect undercloud passwords
|
||||
slurp:
|
||||
src: "{{ working_dir }}/tripleo-undercloud-passwords.yaml"
|
||||
src: "{{ lookup('first_found', password_paths, errors='ignore') }}"
|
||||
register: tmp_undercloud_passwords
|
||||
vars:
|
||||
password_paths:
|
||||
- "{{ working_dir }}/tripleo-undercloud-passwords.yaml"
|
||||
- "{{ working_dir }}/tripleo-deploy/undercloud/tripleo-undercloud-passwords.yaml"
|
||||
|
||||
- name: Setting undercloud outputs and password facts
|
||||
set_fact:
|
||||
|
@@ -42,3 +42,5 @@ undercloud_ara: false
|
||||
install_atop: true
|
||||
atop_command: atop -R -w /var/log/atop.bin
|
||||
tripleo_set_unique_hostname: false
|
||||
|
||||
undercloud_outputs_dir: "{{ working_dir }}"
|
||||
|
@@ -3,9 +3,9 @@
|
||||
- name: Write out tripleo-undercloud-outputs.yaml
|
||||
copy:
|
||||
content: "{{ undercloud_outputs }}"
|
||||
dest: "{{ working_dir }}/tripleo-undercloud-outputs.yaml"
|
||||
dest: "{{ undercloud_outputs_dir }}/tripleo-undercloud-outputs.yaml"
|
||||
|
||||
- name: Write out tripleo-undercloud-passwords.yaml
|
||||
copy:
|
||||
content: "{{ undercloud_passwords }}"
|
||||
dest: "{{ working_dir }}/tripleo-undercloud-passwords.yaml"
|
||||
dest: "{{ undercloud_outputs_dir }}/tripleo-undercloud-passwords.yaml"
|
||||
|
Reference in New Issue
Block a user