summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/common/tasks/generic/mount_home.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/node/roles/common/tasks/generic/mount_home.yml')
-rw-r--r--ansible/node/roles/common/tasks/generic/mount_home.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/ansible/node/roles/common/tasks/generic/mount_home.yml b/ansible/node/roles/common/tasks/generic/mount_home.yml
new file mode 100644
index 0000000..8a49816
--- /dev/null
+++ b/ansible/node/roles/common/tasks/generic/mount_home.yml
@@ -0,0 +1,12 @@
+---
+- name: ensure that an fstab entry exists to NFS mount /home
+ lineinfile:
+ path: /etc/fstab
+ regexp: '^.*:/home /home nfs.*'
+ # Do not use locking, since this starts/needs rpc.statd, which is
+ # stopped/started by CTDB
+ line: '{{ virthost }}:/home /home nfs nfsvers=3,intr,nolock 0 0'
+
+- name: ensure that /home is mounted
+ shell: >
+ findmnt -n /home || mount /home