Restart NFS immediately if exports are updated.

This commit is contained in:
Jeff Geerling 2016-03-11 21:40:30 -06:00
parent efefbf0bc1
commit fffe8b108d

View file

@ -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