
Change-Id: I3a576a358c9ab941df684512c78da454ed2cd625 Related-Change: Idcacfb6dbfb0760128f10dbc0573856e4250b3bc
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
# Copyright (c) 2018 OpenStack Foundation
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
- 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:
|
|
- python-eventlet
|
|
- python-pyeclib
|
|
- python-nose
|
|
- python-swiftclient
|