system-config/roles/openafs-client/tasks/openafs-client/CentOS.yaml
Ian Wienand 170b0c0843 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
2020-02-11 13:15:54 +11:00

62 lines
1.4 KiB
YAML

# EPEL is required for dkms to build the openafs kernel modules
- name: Preinstall EPEL
package:
name:
- epel-release
state: present
become: yes
- name: Create cache directory
file:
path: /var/cache/openafs
state: directory
owner: root
group: root
mode: 0700
setype: afs_cache_t # important! hard-to-debug failures without
become: yes
# Note there is no official AFS builds for CentOS. This uses a
# repository built by the project-config-build-openafs-centos job, see
# https://opendev.org/cgit/openstack/openstack-zuul-jobs/tree/zuul.d/jobs.yaml
- name: Add AFS repo
yum_repository:
name: openafs
description: OpenStack AFS repo
baseurl: '{{ openafs_client_yum_repo_url }}'
gpgcheck: '{{ openafs_client_yum_repo_gpg_check }}'
become: yes
- name: Install kernel modules CentOS 7
yum:
name:
- kernel-devel
- dkms
- gcc
- dkms-openafs
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:
name:
- openafs-krb5
- openafs-client
state: present
become: yes