yumrepos: modernize, fix ppc64le bvmhosts and remove modular repos

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2023-08-19 13:46:57 -07:00
parent 8422e82c07
commit c5542bc327

View file

@ -42,22 +42,6 @@
- packages
- yumrepos
- name: put rhel rhev for power repos on rhel power systems
copy: src="{{ files }}/common/rhel7-power-rhev.repo" dest="/etc/yum.repos.d/rhel7-power-rhev.repo"
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_architecture =='ppc64le' and not inventory_hostname.startswith('ppc9')
tags:
- config
- packages
- yumrepos
- name: put openshift 3.4 repo on os- systems
template: src="{{ files }}/openshift/openshift.repo" dest="/etc/yum.repos.d/openshift.repo"
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7 and inventory_hostname.startswith('os-') and datacenter != "aws"
tags:
- config
- packages
- yumrepos
- name: put epel repos on el systems
copy: src="{{ files }}/common/epel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version|int }}.repo"
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel) and datacenter != "aws"
@ -98,19 +82,7 @@
- fedora.repo
- fedora-updates.repo
- fedora-updates-testing.repo
when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) and not inventory_hostname.startswith('rawhide-test') and datacenter != "aws"
tags:
- config
- packages
- yumrepos
- name: put fedora modular repos on primary architecture systems
template: src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- fedora-modular.repo
- fedora-updates-modular.repo
- fedora-updates-testing-modular.repo
when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith('rawhide-test') and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) and datacenter != "aws"
when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le','bvmhost-p09','buildvmhost-s390x-01')) and not inventory_hostname.startswith('rawhide-test') and datacenter != "aws"
tags:
- config
- packages
@ -122,27 +94,7 @@
- fedora.repo
- fedora-updates.repo
- fedora-updates-testing.repo
when: ansible_distribution == 'Fedora' and (ansible_architecture == 'ppc64' or ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') and datacenter != "aws"
tags:
- config
- packages
- yumrepos
- name: put fedora repos on secondary architecture systems
template: src="{{ files }}/common/{{ item }}-secondary" dest="/etc/yum.repos.d/{{ item }}"
with_items:
- fedora-modular.repo
- fedora-updates-modular.repo
- fedora-updates-testing-modular.repo
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int >= 29 and (ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') and datacenter != "aws"
tags:
- config
- packages
- yumrepos
- name: add aarch64 server rpms repo
copy: src="{{ files }}/common/rhel-{{ ansible_distribution_major_version|int }}-aarch64-server-rpms.repo" dest="/etc/yum.repos.d/rhel-{{ ansible_distribution_major_version|int }}-aarch64-server-rpms.repo"
when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and inventory_hostname.startswith('aarch64-c') and ansible_distribution_major_version|int >= 7 and datacenter != "aws"
when: ansible_distribution == 'Fedora' and (ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') and datacenter != "aws"
tags:
- config
- packages
@ -183,6 +135,9 @@
- name: Make sure older infrastructure tags repos no longer exist
file: path="/etc/yum.repos.d/{{item}}" state=absent
with_items:
- fedora-modular.repo
- fedora-updates-modular.repo
- fedora-updates-testing-modular.repo
- fedora-infra-tags.repo
- fedora-infra-tags-stg.repo
- rhel-infra-tags.repo