f34703d297
Needs crb repo enablement for python3-wheel package, added rockylinux-9 jobs. Change-Id: If36eaeb518828778490a1599f93792c82c189bb6
73 lines
2.3 KiB
YAML
73 lines
2.3 KiB
YAML
---
|
|
- hosts: hypervisors
|
|
vars:
|
|
ansible_become: true
|
|
tasks:
|
|
# Workaround for:
|
|
# http://mirror.ord.rax.opendev.org/epel/7/SRPMS/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
|
|
# See: https://zuul.opendev.org/t/openstack/build/1fa5b2f895c54e7a81a064a2fff5f838/log/centos-7/ansible/tenks-deploy#501
|
|
- block:
|
|
- name: Install epel release
|
|
package:
|
|
name: epel-release
|
|
|
|
- name: Switch the broken mirror
|
|
ini_file:
|
|
path: /etc/yum.repos.d/epel.repo
|
|
section: epel-source
|
|
option: baseurl
|
|
value: http://download.fedoraproject.org/pub/epel/$releasever/SRPMS/
|
|
|
|
- name: Make sure metalink does not exist
|
|
ini_file:
|
|
path: /etc/yum.repos.d/epel.repo
|
|
section: epel-source
|
|
option: metalink
|
|
state: absent
|
|
|
|
- name: Install Open vSwitch
|
|
include_role:
|
|
name: fkautz.openvswitch-install
|
|
when:
|
|
- ansible_facts.os_family == "RedHat"
|
|
- ansible_facts.distribution_major_version is version(8, '<')
|
|
|
|
- block:
|
|
- name: Install the Delorean repositories
|
|
get_url:
|
|
url: "{{ item }}"
|
|
dest: /etc/yum.repos.d/
|
|
with_items:
|
|
- "https://trunk.rdoproject.org/centos{{ ansible_facts.distribution_major_version }}-master/consistent/delorean.repo"
|
|
- "https://trunk.rdoproject.org/centos{{ ansible_facts.distribution_major_version }}-master/delorean-deps.repo"
|
|
|
|
- name: Install Open vSwitch
|
|
package:
|
|
name: openvswitch
|
|
|
|
- name: Start openvswitch service
|
|
service:
|
|
name: openvswitch
|
|
state: started
|
|
when:
|
|
- ansible_facts.os_family == "RedHat"
|
|
- ansible_facts.distribution_major_version is version(8, '>=')
|
|
|
|
- block:
|
|
- name: Install packages
|
|
package:
|
|
name: "{{ item }}"
|
|
register: result
|
|
until: result is success
|
|
retries: 3
|
|
with_items:
|
|
- openvswitch-switch
|
|
- openvswitch-common
|
|
|
|
- name: Start openvswitch service
|
|
service:
|
|
name: openvswitch-switch
|
|
state: started
|
|
when: ansible_facts.os_family == "Debian"
|
|
|