Merge "Populate /etc/yum/vars/contentdir"

This commit is contained in:
Zuul 2018-05-16 22:59:25 +00:00 committed by Gerrit Code Review
commit 2220845d30
1 changed files with 26 additions and 0 deletions

View File

@ -25,6 +25,32 @@
dest: /etc/ci/mirror_info.sh
src: mirror_info.sh.j2
- name: Check for /etc/yum/vars/contentdir
stat:
path: /etc/yum/vars/contentdir
register: yum_contentdir
- when: not yum_contentdir.stat.exists
block:
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch
set_fact:
yum_contentdir: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir|default('centos') }}"
become: true
- name: Install repos (will be removed by toci_gatetest)
package:
name: "{{ item }}"