summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml')
-rw-r--r--ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml b/ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml
new file mode 100644
index 0000000..c498443
--- /dev/null
+++ b/ansible/node/roles/storage/tasks/generic/clusterfs-gpfs.yml
@@ -0,0 +1,20 @@
+---
+- name: create cluster filesystem mountpoint
+ file:
+ path: "{{clusterfs.mountpoint}}"
+ state: directory
+
+- name: create cluster filesystem automount directory
+ file:
+ path: "{{clusterfs.mountpoint}}/automount"
+ state: directory
+
+- name: make cluster filesystem mountpoint immutable
+ shell: >
+ if ! findmnt "{{clusterfs.mountpoint}}"; then
+ chattr +i "{{clusterfs.mountpoint}}"
+ fi
+
+- import_tasks: clusterfs-gpfs-once.yml
+ run_once: true
+ when: nodes[ansible_hostname].has_shared_storage