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:
yatin 2018-06-11 17:41:20 +05:30
parent 86af808281
commit 1cecdcc54b
1 changed files with 7 additions and 2 deletions

View File

@ -42,13 +42,18 @@
- name: Set contentdir to altarch
set_fact:
yum_contentdir: altarch
yum_contentdir_data: altarch
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
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir|default('centos') }}"
content: "{{ yum_contentdir_data }}"
become: true
- name: Install repos (will be removed by toci_gatetest)