Skip to content
Snippets Groups Projects
Commit f9e9f5ca authored by Chris Hines's avatar Chris Hines
Browse files

fix up the NFS related tasks, so that the server definitly restarts after the...

fix up the NFS related tasks, so that the server definitly restarts after the exports are written and the mounting of filesystems on clients is correct
parent 118dfd07
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,8 @@
service: name=fail2ban state=stopped
sudo: true
- name: "Mounting NFS mounts"
mount: name={{ item.mntpt }} src={{ item.src }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
mount: name={{ item.name }} src=" {{ item.ipv4 }}:{{ item.src }} " fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: nfsMounts
notify: "restart authentication"
notify: "restart rpcbind"
......
......@@ -8,11 +8,15 @@
template: src=exports.j2 dest=/etc/exports owner=root group=root mode=644
sudo: true
# Do not do this as a handler, instead do this here as a task so that it happens imediatly after the exports file is created before any clients
# attempt a mount
- name : "Reload exports"
command: exportfs -ra
- name: "Start the Server"
service: "name=nfs state=restarted"
sudo: true
when: ansible_os_family == "RedHat"
- name: "Start the Server"
service: "name=nfs-kernel-server state=restarted"
sudo: true
when: ansible_os_family == "Debian"
- name : "Pause ... clients sometimes have errors"
command: sleep 60
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment