c377337673
When using boolean variables in conditional tests, those variables should be filtered as '|bool'. Otherwise, they are being evaluated as a string and return True in any case. Change-Id: I1e3642cb2d33d839e4808ae79ae991175e32dd0f Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
- name: Clean up the repos
|
|
become: yes
|
|
file: path=/etc/yum.repos.d/{{ item }} state=absent
|
|
with_items: "{{ repos }}"
|
|
when: step_pre_undercloud_upgrade|bool
|
|
|
|
- name: Execute upgrade repo script
|
|
become: yes
|
|
shell: >
|
|
set -o pipefail &&
|
|
{{ upgrade_working_dir }}/upgrade-undercloud-repo.sh 2>&1 {{ timestamper_cmd }} >
|
|
upgrade-undercloud-repo.sh.log
|
|
when: step_pre_undercloud_upgrade|bool
|
|
|
|
- name: Clean yum cache
|
|
become: yes
|
|
shell: yum clean all
|
|
|
|
- name: Push hieradata override file for workers
|
|
template:
|
|
src: "quickstart-hieradata-overrides.yaml.j2"
|
|
dest: "{{ upgrade_working_dir }}/quickstart-hieradata-overrides.yaml"
|
|
|
|
- name: Create undercloud upgrade script
|
|
template:
|
|
src: "{{ undercloud_upgrade_script }}"
|
|
dest: "{{ upgrade_working_dir }}/undercloud-upgrade.sh"
|
|
mode: 0755
|
|
|
|
- name: Make sure no Tht repo is present
|
|
when: mixed_upgrade|bool
|
|
file: path={{ upgrade_working_dir }}/{{ tht_dir }} state=absent
|
|
|
|
- name: Copy current Tht directory to the upgrade working dir
|
|
when: mixed_upgrade|bool
|
|
shell: >
|
|
cp -R /usr/share/openstack-tripleo-heat-templates \
|
|
{{ upgrade_working_dir }}/{{ tht_dir }};
|