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

Removed

  1) attempts in nfs-client to notify two handlers at once (this didn't work)
  2) attempts to mount a file system twice (I don't know why we included this in the first place, mounts should work first time)
  3) checks using mountpoint -q (this a) didn't work when updating a mount b) only checked the first mount)


Former-commit-id: 75e7357b
parent a17e51ea
No related branches found
No related tags found
No related merge requests found
---
- name: "stop fail2ban"
service: name=fail2ban state=stopped
sudo: true
- name: "Check NFS mount, it may not be necessary, just in case if the following role does actively re-mount"
shell: mountpoint -q {{ nfsMounts[0].name }}
register: mount_state
ignore_errors: true
when: nfsMounts is defined
- name: "Mounting NFS mounts"
mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: "{{ nfsMounts }}"
notify: "restart rpcbind"
notify: "restart idmap"
sudo: true
ignore_errors: true
register: firstMount
when: nfsMounts is defined and mount_state | failed
- name: "Wait for nfs to stabailse"
command: sleep 60
delegate_to: 127.0.0.1
when: firstMount | failed
- name: "Mounting NFS mounts after failure"
mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: "{{ nfsMounts }}"
notify: "restart idmap"
notify: "restart rpcbind"
sudo: true
when: nfsMounts is defined and firstMount is defined and firstMount | failed
- name: "restart fail2ban"
service: name=fail2ban state=started
sudo: true
when: nfsMounts is defined
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