042fcb4754
* Support Python 3 * Use Open vSwitch from Delorean master in CI * Add a tenks-deploy-teardown-centos8 CI job Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/26 Depends-On: https://github.com/stackhpc/ansible-role-libvirt-vm/pull/53 Change-Id: Ibd504389523bf1197aa5f7c3e9ef6cad8966ddc2
73 lines
2.1 KiB
YAML
73 lines
2.1 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_os_family == "RedHat"
|
|
- ansible_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/centos8-master/consistent/delorean.repo
|
|
- https://trunk.rdoproject.org/centos8-master/delorean-deps.repo
|
|
|
|
- name: Install Open vSwitch
|
|
package:
|
|
name: openvswitch
|
|
|
|
- name: Start openvswitch service
|
|
service:
|
|
name: openvswitch
|
|
state: started
|
|
when:
|
|
- ansible_os_family == "RedHat"
|
|
- ansible_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_os_family == "Debian"
|
|
|