Fix yum contentdir var for non altarch
Review https://review.openstack.org/#/c/568701/ created contentdir file, but it's not working where file is not present. This patch fixes it for non altarch when file: contentdir is not present on host. Also change the fact name to yum_contentdir_data as yum_contentdir conflicts with the when condition. Change-Id: I99c095ab0da0cf969f0b7a1b3af890cc89c65454
This commit is contained in:
parent
86af808281
commit
1cecdcc54b
@ -42,13 +42,18 @@
|
|||||||
|
|
||||||
- name: Set contentdir to altarch
|
- name: Set contentdir to altarch
|
||||||
set_fact:
|
set_fact:
|
||||||
yum_contentdir: altarch
|
yum_contentdir_data: altarch
|
||||||
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
|
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
|
||||||
|
|
||||||
|
- name: Set contentdir to default centos arch
|
||||||
|
set_fact:
|
||||||
|
yum_contentdir_data: centos
|
||||||
|
when: rpm_arch.stdout not in ['aarch64', 'ppc64le']
|
||||||
|
|
||||||
- name: Populate /etc/yum/vars/contentdir
|
- name: Populate /etc/yum/vars/contentdir
|
||||||
copy:
|
copy:
|
||||||
dest: /etc/yum/vars/contentdir
|
dest: /etc/yum/vars/contentdir
|
||||||
content: "{{ yum_contentdir|default('centos') }}"
|
content: "{{ yum_contentdir_data }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Install repos (will be removed by toci_gatetest)
|
- name: Install repos (will be removed by toci_gatetest)
|
||||||
|
Loading…
Reference in New Issue
Block a user