diff --git a/roles/nfs-client/tasks/mountFileSystem.yml b/roles/nfs-client/tasks/mountFileSystem.yml index 0dc48290c5dfa850ef847654c5d9c4708ce61e2c..53abd33de55622d44c001ab2f186a0335198bc50 100644 --- a/roles/nfs-client/tasks/mountFileSystem.yml +++ b/roles/nfs-client/tasks/mountFileSystem.yml @@ -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" diff --git a/roles/syncExports/tasks/addExports.yml b/roles/syncExports/tasks/addExports.yml index 8853541bcd81ebbe805949044d2d030b89dc5bdf..79484a27f8091d2390df226a0b62216c8c110d85 100644 --- a/roles/syncExports/tasks/addExports.yml +++ b/roles/syncExports/tasks/addExports.yml @@ -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