This also depends on CTDB's statd-callout to be fixed to get
NFS_HOSTNAME using nfsconf.
Signed-off-by: Martin Schwenke <martin@meltin.net>
loop_control:
loop_var: s
-- name: generate NFS configuration
+- name: check for new style /etc/nfs.conf
+ stat:
+ path: /etc/nfs.conf
+ register: etc_nfs_conf
+
+- name: generate old style NFS configuration
template:
src: nfs_sysconfig.j2
dest: /etc/sysconfig/nfs
+ when: not etc_nfs_conf.stat.exists
+
+- name: generate new style NFS configuration
+ template:
+ src: nfs_conf.j2
+ dest: /etc/nfs.conf
+ when: etc_nfs_conf.stat.exists
- name: check if /etc/sysconfig/rpc-rquotad exists
stat:
--- /dev/null
+NFS_HOSTNAME="{{ cluster }}"
--- /dev/null
+# autocluster nfs.conf
+#
+[general]
+# defaults
+
+[exportfs]
+# defaults
+
+[gssd]
+use-gss-proxy=1
+
+[lockd]
+port = 61005
+udp-port = 61005
+
+[mountd]
+port = 61003
+
+[nfsdcltrack]
+# defaults
+
+[nfsd]
+vers4 = n
+threads = 8
+
+[statd]
+name = {{ cluster }}
+port = 61001
+outgoing-port = 61002
+ha-callout = {{ ctdb_config_dir }}/statd-callout
+
+[sm-notify]
+# defaults