Greatly simplify the role since most things are the same cross-platform.

This commit is contained in:
Jeff Geerling 2015-02-22 14:59:26 -06:00
parent 81bd62a237
commit fa94acec71
6 changed files with 8 additions and 29 deletions

View file

@ -1,3 +1,3 @@
---
- name: restart nfs server
- name: restart nfs
service: "name={{ nfs_server_daemon }} state=restarted"

View file

@ -1,4 +0,0 @@
---
- name: Ensure NFS is running.
service: name=nfs-kernel-server state=started enabled=yes
when: nfs_exports

View file

@ -1,7 +0,0 @@
---
- name: Ensure rpcbind and nfs are running.
service: "name={{ item }} state=started enabled=yes"
with_items:
- rpcbind
- nfs
when: nfs_exports

View file

@ -17,11 +17,12 @@
owner: root
group: root
mode: 0644
notify: restart nfs server
notify: restart nfs
# Configuration tasks.
- include: configure-RedHat.yml
when: ansible_os_family == 'RedHat'
- include: configure-Debian.yml
when: ansible_os_family == 'Debian'
- name: Ensure rpcbind and nfs are running.
service: "name={{ item }} state=started enabled=yes"
with_items:
- rpcbind
- "{{ nfs_server_daemon }}"
when: nfs_exports|length

View file

@ -4,7 +4,3 @@
with_items:
- nfs-common
- nfs-kernel-server
# This isn't necessary until exports are configured in /etc/exports.
# - name: Ensure NFS is running.
# service: name=nfs-kernel-server state=started enabled=yes

View file

@ -1,10 +1,3 @@
---
- name: Ensure NFS utilities are installed.
yum: name=nfs-utils state=installed
# This isn't necessary until exports are configured in /etc/exports.
# - name: Ensure rpcbind and nfs are running.
# service: "name={{ item }} state=started enabled=yes"
# with_items:
# - rpcbind
# - nfs