Fix openvswitch deployment for RHEL
This commit is contained in:
parent
a3178a57e2
commit
5b5323a518
3 changed files with 29 additions and 21 deletions
|
|
@ -24,6 +24,7 @@
|
|||
- etc/yum.repos.d/CentOS-Stream-NFV-OpenvSwitch.repo
|
||||
- etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
|
||||
when:
|
||||
- ansible_distribution != "RedHat"
|
||||
# - ansible_distribution == "OracleLinux"
|
||||
- ansible_distribution != "CentOS"
|
||||
- ansible_distribution_major_version >= '8'
|
||||
|
|
@ -33,22 +34,22 @@
|
|||
state: present
|
||||
when:
|
||||
- ansible_distribution == "CentOS"
|
||||
#- name: Enable a Fast Datapath RHSM repository
|
||||
# community.general.rhsm_repository:
|
||||
# name: "fast-datapath-for-rhel-8-{{ ansible_architecture }}-rpms"
|
||||
# when:
|
||||
# - ansible_distribution == "RedHat"
|
||||
# - ansible_distribution_major_version == '8'
|
||||
- name: Install OpenvSwitch
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- openvswitch2.17
|
||||
- openvswitch2.17-ipsec
|
||||
- openvswitch-selinux-extra-policy
|
||||
- python3-openvswitch2.17
|
||||
- NetworkManager-ovs
|
||||
# - network-scripts-openvswitch2.16
|
||||
state: present
|
||||
- name: Enable a Fast Datapath RHSM repository
|
||||
community.general.rhsm_repository:
|
||||
name: "fast-datapath-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms"
|
||||
when:
|
||||
- ansible_distribution == "RedHat"
|
||||
- ansible_distribution_major_version >= '8'
|
||||
#- name: Install OpenvSwitch
|
||||
# ansible.builtin.package:
|
||||
# name:
|
||||
# - openvswitch3.2
|
||||
# - openvswitch3.2-ipsec
|
||||
# - openvswitch-selinux-extra-policy
|
||||
# - python3-openvswitch3.2
|
||||
# - NetworkManager-ovs
|
||||
## - network-scripts-openvswitch2.16
|
||||
# state: present
|
||||
# update_cache: yes
|
||||
# when:
|
||||
# - (ansible_distribution == "OracleLinux") or (ansible_distribution == "CentOS")
|
||||
## when:
|
||||
## - (ansible_distribution == "OracleLinux") or (ansible_distribution == "CentOS")
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
- name: Include tasks for {{ ansible_os_family }}
|
||||
include_tasks: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: install packages
|
||||
- name: Install OpenVSwith packages
|
||||
package:
|
||||
name: "{{ openvswitch_packages }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
when:
|
||||
ansible_os_family != "RedHat"
|
||||
# when:
|
||||
# ansible_os_family != "RedHat"
|
||||
notify: Restart openvswitch
|
||||
|
||||
- name: Enable openvswitch
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
---
|
||||
openvswitch_service: openvswitch
|
||||
|
||||
openvswitch_packages:
|
||||
- openvswitch3.2
|
||||
- openvswitch3.2-ipsec
|
||||
- openvswitch-selinux-extra-policy
|
||||
- python3-openvswitch3.2
|
||||
- NetworkManager-ovs
|
||||
# - network-scripts-openvswitch2.16
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue