diff --git a/files/etc/yum.repos.d/CentOS-9-Stream-NFV-OpenvSwitch.repo b/files/etc/yum.repos.d/CentOS-9-Stream-NFV-OpenvSwitch.repo deleted file mode 100644 index 1ebba18..0000000 --- a/files/etc/yum.repos.d/CentOS-9-Stream-NFV-OpenvSwitch.repo +++ /dev/null @@ -1,13 +0,0 @@ -# RockyLinux-NFV-OpenvSwitch.repo -# -# Please see http://wiki.centos.org/SpecialInterestGroup/NFV for more -# information - -[centos-nfv-openvswitch] -name=CentOS Stream 9 - NFV OpenvSwitch -baseurl=http://mirror.stream.centos.org/SIGs/9-stream/nfv/$basearch/openvswitch-2/ -gpgcheck=1 -enabled=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV -module_hotfixes=1 - diff --git a/files/etc/yum.repos.d/CentOS-Stream-NFV-OpenvSwitch.repo b/files/etc/yum.repos.d/CentOS-Stream-NFV-OpenvSwitch.repo new file mode 100644 index 0000000..15ddbcf --- /dev/null +++ b/files/etc/yum.repos.d/CentOS-Stream-NFV-OpenvSwitch.repo @@ -0,0 +1,17 @@ +# CentOS-NFV-OpenvSwitch.repo +# +# Please see http://wiki.centos.org/SpecialInterestGroup/NFV for more +# information + +[centos-nfv-openvswitch] +name=CentOS Stream {{ ansible_distribution_major_version }} - NFV OpenvSwitch +{% if ansible_distribution_major_version == 8 %} +baseurl=http://mirror.centos.org/centos/8-stream/nfv/$basearch/openvswitch-2/ +{% elif ansible_distribution_major_version == 9 %} +baseurl=http://mirror.stream.centos.org/SIGs/9-stream/nfv/$basearch/openvswitch-2/ +{% endif %} +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV +module_hotfixes=1 + diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index 6ded6b7..9732612 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -1,18 +1,18 @@ --- -- name: Install RockyLinux NFV Openvswitch Repository - copy: - src: "{{ item }}" - dest: "/{{ item }}" - owner: root - group: root - mode: 0644 - with_items: - - etc/yum.repos.d/RockyLinux-NFV-OpenvSwitch.repo - - etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial - when: -# - ansible_distribution == "OracleLinux" - - ansible_distribution != "CentOS" - - ansible_distribution_major_version == '8' +#- name: Install RockyLinux NFV Openvswitch Repository +# copy: +# src: "{{ item }}" +# dest: "/{{ item }}" +# owner: root +# group: root +# mode: 0644 +# with_items: +# - etc/yum.repos.d/RockyLinux-NFV-OpenvSwitch.repo +# - etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial +# when: +## - ansible_distribution == "OracleLinux" +# - ansible_distribution != "CentOS" +# - ansible_distribution_major_version == '8' - name: Install CentOS Stream NFV Openvswitch Repository copy: src: "{{ item }}" @@ -21,12 +21,12 @@ group: root mode: 0644 with_items: - - etc/yum.repos.d/CentOS-9-Stream-NFV-OpenvSwitch.repo + - etc/yum.repos.d/CentOS-Stream-NFV-OpenvSwitch.repo - etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV when: # - ansible_distribution == "OracleLinux" - ansible_distribution != "CentOS" - - ansible_distribution_major_version == '9' + - ansible_distribution_major_version >= '8' - name: Install CentOS NFV Openvswitch Repository RPM ansible.builtin.package: name: centos-release-nfv-openvswitch