diff --git a/ansible/group_vars/all/system.yaml b/ansible/group_vars/all/system.yaml index 93f1e78e3..d36e750c8 100644 --- a/ansible/group_vars/all/system.yaml +++ b/ansible/group_vars/all/system.yaml @@ -1,7 +1,3 @@ -# Alma linux -alma_linux_extra_repo_base_url: https://repo.almalinux.org/almalinux/$releasever/extras/$basearch/os/ -alma_linux_extra_repo_mirror_list_url: https://mirrors.almalinux.org/mirrorlist/$releasever/extras -alma_linux_gpg_key_url: https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux # TODO: use overrides to set these kubernetes_rpm_repository_url: "https://packages.d2iq.com/konvoy/stable/linux/repos/el/kubernetes-v{{ kubernetes_version }}-nokmem/x86_64" kubernetes_rpm_gpg_key_url: "https://packages.d2iq.com/konvoy/stable/linux/repos/d2iq-sign-authority-gpg-public-key" diff --git a/ansible/roles/gpu/tasks/nvidia-gpu-RHEL.yaml b/ansible/roles/gpu/tasks/nvidia-gpu-RHEL.yaml index 00be51c97..47ba214c0 100644 --- a/ansible/roles/gpu/tasks/nvidia-gpu-RHEL.yaml +++ b/ansible/roles/gpu/tasks/nvidia-gpu-RHEL.yaml @@ -1,11 +1,13 @@ --- - name: enable RHEL 8 repos - shell: subscription-manager repos --enable=rhel-8-for-x86_64-baseos-eus-rpms + shell: subscription-manager repos --enable=rhel-8-for-x86_64-baseos-eus-rpms when: - rhelorg != None or rheluser != None - ansible_distribution_major_version == '8' + - ansible_distribution_version is version('8.10', '<') -- name: install kernel {{ hostvars[inventory_hostname].ansible_kernel }} headers and devel + +- name: install kernel headers and devel for kernel version on remote detected {{ hostvars[inventory_hostname].ansible_kernel }} yum: name: - "kernel-headers-{{ hostvars[inventory_hostname].ansible_kernel }}" diff --git a/ansible/roles/repo/tasks/redhat.yaml b/ansible/roles/repo/tasks/redhat.yaml index f2efd7103..719e72b94 100644 --- a/ansible/roles/repo/tasks/redhat.yaml +++ b/ansible/roles/repo/tasks/redhat.yaml @@ -48,57 +48,6 @@ - rhelorg.subscribed_pool_ids is defined or rheluser.subscribed_pool_ids is defined - ansible_distribution_major_version == '8' -# The AppStream repo for Centos 8 is not available from centos mirror list. -# AlmaLinux is 1:1 binary compatible with RHEL and subscription free. -# Alma linux's extra repository symlinks epel repository rpms. https://wiki.almalinux.org/repos/AlmaLinux.html -# Why not RHEL repo?: RHEL is RHEL though the free subscription expires once a year. -# it cannot be renewed until it does expire and then you have to re-register your systems to pick up the new subscription. -# Also RHEL repos are missing some python3 rpms that we need. -- name: add alma linux extra repository - yum_repository: - name: alma-linux-extra - description: Extra repository for alma linux - file: almalinux - baseurl: "{{ alma_linux_extra_repo_base_url }}" - mirrorlist: "{{ alma_linux_extra_repo_mirror_list_url }}" - enabled: yes - gpgkey: "{{ alma_linux_gpg_key_url }}" - gpgcheck: yes - when: - - ansible_distribution_major_version == '8' - -# epel-release for Centos/RHEL/Oracle 8 will be installed using Alma linux "extra" repository -- name: install epel-release for RHEL 8.x - yum: - name: - - epel-release - state: present - disablerepo: appstream - when: - - ansible_distribution_major_version == '8' - -# The epel repo files installed from alma linux contain variable "$releasever". -# This variable may not get properly replaced in all environments. -# Replace it with the minor version "8" (similar to what upstream does). -# see https://access.redhat.com/discussions/5473561?page=2 -- name: find epel-release repo files - find: - depth: 1 - paths: /etc/yum.repos.d - patterns: 'epel*.repo' - register: epel_repo_files - when: - - ansible_distribution_major_version == '8' - -- name: set $releasever variables in epel-release repo files - replace: - path: "{{ item.path }}" - regexp: '\$releasever' - replace: '8' - loop: "{{ epel_repo_files.files }}" - when: - - ansible_distribution_major_version == '8' - # RPM - name: add Konvoy Kubernetes rpm repository yum_repository: @@ -112,7 +61,3 @@ until: konvoy_repo_installation_rpm is success retries: 5 delay: 6 - -- name: clean yum caches - shell: yum clean all - when: ansible_distribution_major_version == '7'