openstack-zuul-jobs/playbooks/wheel-cache/pre.yaml

60 lines
1.7 KiB
YAML

- hosts: all
roles:
- bindep
pre_tasks:
# NOTE(pabelanger): Manually install EPEL dependencies as not to
# keep EPEL enabled.
- name: Manually install EPEL dependencies
become: yes
yum:
name: "{{ item }}"
enablerepo: epel
state: present
loop:
- parallel
when: ansible_distribution == "CentOS"
# NOTE(pabelanger): We need to install extra libraries, such as
# liberasurecode-devel
# which are only part of the RDO repositories.
- name: Add centos-release-openstack for CentOS 7
yum:
name: centos-release-openstack-train
state: present
become: yes
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == '7'
- name: Add centos-release-openstack for CentOS 8
yum:
name: centos-release-openstack-xena
state: present
become: yes
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == '8'
- name: Add centos-release-openstack for CentOS 9
yum:
name: centos-release-openstack-yoga
state: present
become: yes
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == '9'
# This depends on rabbitmq, which isn't build for
# aarch64 and thus causes everything to stop
# See https://bugs.centos.org/view.php?id=16968
- name: Remove rabbitmq for aarch64
file:
path: /etc/yum.repos.d/CentOS-Messaging-rabbitmq.repo
state: absent
become: yes
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == '8'
- ansible_architecture == 'aarch64'