From 37dafa03feea67d15547ad52bcec5994b8243dd4 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 21 May 2018 15:52:06 -0700 Subject: [PATCH] Fix probe tests in the gate Change-Id: I3a576a358c9ab941df684512c78da454ed2cd625 Related-Change: Idcacfb6dbfb0760128f10dbc0573856e4250b3bc --- .../install_dependencies.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/playbooks/saio_single_node_setup/install_dependencies.yaml b/playbooks/saio_single_node_setup/install_dependencies.yaml index 3302b99855..c6a4addad8 100644 --- a/playbooks/saio_single_node_setup/install_dependencies.yaml +++ b/playbooks/saio_single_node_setup/install_dependencies.yaml @@ -15,6 +15,32 @@ - hosts: all become: true tasks: + - 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: installing dependencies yum: name={{ item }} state=present with_items: