openafs-client: use dnf for CentOS 8

We are seeing some failures that seem to add up to the yum module not
detecting a failure installing the kernel modules for openafs.  See if
this works better with "dnf", which is the native package installer on
CentOS 8.

Change-Id: I82588ed5a02e5dff601b41b27b28a663611bfe89
This commit is contained in:
Ian Wienand 2020-02-11 13:14:45 +11:00
parent 3c13f523a1
commit 170b0c0843

View File

@ -28,7 +28,7 @@
gpgcheck: '{{ openafs_client_yum_repo_gpg_check }}'
become: yes
- name: Install kernel modules
- name: Install kernel modules CentOS 7
yum:
name:
- kernel-devel
@ -38,6 +38,19 @@
enablerepo: epel # dkms
state: present
become: yes
when: ansible_distribution_version is version('8', '<')
- name: Install kernel modules CentOS 8
dnf:
name:
- kernel-devel
- dkms
- gcc
- dkms-openafs
enablerepo: epel # dkms
state: present
become: yes
when: ansible_distribution_version is version('8', '>=')
- name: Install client
yum: