mirror of
https://github.com/geerlingguy/ansible-role-nfs
synced 2025-01-05 15:00:21 +01:00
Greatly simplify the role since most things are the same cross-platform.
This commit is contained in:
parent
81bd62a237
commit
fa94acec71
6 changed files with 8 additions and 29 deletions
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
- name: restart nfs server
|
||||
- name: restart nfs
|
||||
service: "name={{ nfs_server_daemon }} state=restarted"
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- name: Ensure NFS is running.
|
||||
service: name=nfs-kernel-server state=started enabled=yes
|
||||
when: nfs_exports
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue