summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/nas/tasks/redhat/nfs.yml
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-02-06 14:53:10 +1100
committerMartin Schwenke <martin@meltin.net>2019-03-25 16:52:25 +1100
commit51ff83de30db6934e243226ce05c6394b8986a12 (patch)
treef8dbbe3ceabc398a4596c968285a7245b3c70e01 /ansible/node/roles/nas/tasks/redhat/nfs.yml
parent7003df8ad2ec9eaa119439f21976e7117b1771e5 (diff)
downloadautocluster-51ff83de30db6934e243226ce05c6394b8986a12.tar.gz
autocluster-51ff83de30db6934e243226ce05c6394b8986a12.tar.xz
autocluster-51ff83de30db6934e243226ce05c6394b8986a12.zip
Add Ansible playbook for node configuration
This will replace all of the existing node provisioning/configuration. CentOS 7 nodes are currently supported. Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ansible/node/roles/nas/tasks/redhat/nfs.yml')
-rw-r--r--ansible/node/roles/nas/tasks/redhat/nfs.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible/node/roles/nas/tasks/redhat/nfs.yml b/ansible/node/roles/nas/tasks/redhat/nfs.yml
new file mode 100644
index 0000000..4dc1d7c
--- /dev/null
+++ b/ansible/node/roles/nas/tasks/redhat/nfs.yml
@@ -0,0 +1,31 @@
+---
+- name: install NFS packages
+ package:
+ name: nfs-utils
+ state: present
+
+- name: ensure NFS does not autostart
+ service:
+ name: "{{ s }}"
+ enabled: no
+ with_list:
+ - nfs
+ - nfslock
+ loop_control:
+ loop_var: s
+
+- name: generate NFS configuration
+ template:
+ src: nfs_sysconfig.j2
+ dest: /etc/sysconfig/nfs
+
+- name: check if /etc/sysconfig/rpc-rquotad exists
+ stat:
+ path: /etc/sysconfig/rpc-rquotad
+ register: sysconfig_rpc_rquotad
+
+- name: generate quota configuration file
+ file:
+ src: rpc-rquotad.sysconfig
+ path: /etc/sysconfig/rpc-rquotad
+ when: sysconfig_rpc_rquotad.stat.exists