Merge "Sync full /etc/leapp/files directory." into stable/train

This commit is contained in:
Zuul 2021-05-03 21:30:30 +00:00 committed by Gerrit Code Review
commit 1cd4535022
1 changed files with 11 additions and 25 deletions

View File

@ -297,37 +297,23 @@ outputs:
package:
name: leapp
state: latest
- name: Check that the /etc/leapp/files/pes-events.json exists on UC
- name: Retrieve files in /etc/leapp/files
find:
paths: "/etc/leapp/files"
patterns: "*"
register: uc_leapp_files
delegate_to: undercloud
stat:
path: '/etc/leapp/files/pes-events.json'
register: pes_present
- name: Check that the /etc/leapp/files/repomap.csv exists on UC
delegate_to: undercloud
stat:
path: '/etc/leapp/files/repomap.csv'
register: repomap_present
- name: Fetch the Leapp data from undercloud
fetch:
dest: '{{ playbook_dir }}'
src: '{{ item }}'
dest: "{{ playbook_dir }}"
src: "{{ item.path }}"
loop: "{{ uc_leapp_files.files }}"
delegate_to: undercloud
with_items:
- /etc/leapp/files/pes-events.json
- /etc/leapp/files/repomap.csv
when:
- repomap_present.stat.exists
- pes_present.stat.exists
- name: Copy the Leapp data from undercloud
copy:
dest: '{{ item }}'
src: '{{ playbook_dir }}/{{ inventory_hostname }}/{{ item }}'
with_items:
- /etc/leapp/files/pes-events.json
- /etc/leapp/files/repomap.csv
when:
- repomap_present.stat.exists
- pes_present.stat.exists
dest: '{{ item.path }}'
src: '{{ playbook_dir }}/{{ inventory_hostname }}/{{ item.path }}'
loop: "{{ uc_leapp_files.files }}"
- name: Run LeappInitCommand
shell:
list_join: