mirror of
https://github.com/geerlingguy/ansible-role-nfs
synced 2025-01-07 07:50:19 +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"
|
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
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart nfs server
|
notify: restart nfs
|
||||||
|
|
||||||
# Configuration tasks.
|
# Configuration tasks.
|
||||||
- include: configure-RedHat.yml
|
- name: Ensure rpcbind and nfs are running.
|
||||||
when: ansible_os_family == 'RedHat'
|
service: "name={{ item }} state=started enabled=yes"
|
||||||
|
with_items:
|
||||||
- include: configure-Debian.yml
|
- rpcbind
|
||||||
when: ansible_os_family == 'Debian'
|
- "{{ nfs_server_daemon }}"
|
||||||
|
when: nfs_exports|length
|
||||||
|
|
|
@ -4,7 +4,3 @@
|
||||||
with_items:
|
with_items:
|
||||||
- nfs-common
|
- nfs-common
|
||||||
- nfs-kernel-server
|
- 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.
|
- name: Ensure NFS utilities are installed.
|
||||||
yum: name=nfs-utils state=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