Make the role work on Fedora systems

The commit makes sure that we include the correct overrides for service
names, and also that we don't assume yum as the package manager since
newer Fedora versions (22 and above) use dnf.

Tested on Fedora 23.
This commit is contained in:
Nikola Dipanov 2016-03-11 14:24:57 +00:00
parent 4f0519acee
commit e7c2f5a175
3 changed files with 7 additions and 1 deletions

View file

@ -7,6 +7,10 @@
include_vars: RedHat-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
- name: Include overrides specific to Fedora.
include_vars: Fedora.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == "Fedora"
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'

View file

@ -1,6 +1,6 @@
---
- name: Ensure NFS utilities are installed.
yum: name=nfs-utils state=installed
package: name=nfs-utils state=installed
- name: Ensure rpcbind is running.
service: name=rpcbind state=started enabled=yes

2
vars/Fedora.yml Normal file
View file

@ -0,0 +1,2 @@
---
nfs_server_daemon: nfs-server