9c126332be
Open vSwitch packages are no longer present in the default, or EPEL repoistories. This means there is no clean way to install Open vSwitch on CentOS. Instead, we should leave it up the user to decide how to install it. Change-Id: Ie56296230c9840e542ac70d96dc68c285d198ad6
50 lines
1.4 KiB
YAML
50 lines
1.4 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"
|
|
|
|
- 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"
|
|
|