mirror of
https://github.com/geerlingguy/ansible-role-nfs
synced 2024-12-05 00:50:18 +01:00
Restart NFS immediately if exports are updated.
This commit is contained in:
parent
efefbf0bc1
commit
fffe8b108d
1 changed files with 5 additions and 0 deletions
|
@ -30,8 +30,13 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
register: nfs_exports_copy
|
||||
notify: restart nfs
|
||||
|
||||
- name: Restart NFS immediately if exports are updated.
|
||||
service: "name={{ nfs_server_daemon }} state=restarted"
|
||||
when: nfs_exports_copy.changed
|
||||
|
||||
- name: Ensure nfs is running.
|
||||
service: "name={{ nfs_server_daemon }} state=started enabled=yes"
|
||||
when: nfs_exports|length
|
||||
|
|
Loading…
Reference in a new issue