summaryrefslogtreecommitdiffstats
path: root/roles/ganesha/templates
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-07 07:03:57 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-07 07:03:57 +0100
commit6bc3a3ac71e11fb6459df715536fec373c123a97 (patch)
treec99a4507012fd853ffa2622e35fa26f3bd3804e3 /roles/ganesha/templates
parent69adb23c59e991ddcabf5cfce415fd8b638dbc1a (diff)
downloadands-6bc3a3ac71e11fb6459df715536fec373c123a97.tar.gz
ands-6bc3a3ac71e11fb6459df715536fec373c123a97.tar.bz2
ands-6bc3a3ac71e11fb6459df715536fec373c123a97.tar.xz
ands-6bc3a3ac71e11fb6459df715536fec373c123a97.zip
Streamlined networking, OpenShift recovery, Ganesha
Diffstat (limited to 'roles/ganesha/templates')
-rw-r--r--roles/ganesha/templates/ganesha-ha.conf.j212
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/ganesha/templates/ganesha-ha.conf.j2 b/roles/ganesha/templates/ganesha-ha.conf.j2
new file mode 100644
index 0000000..bdb2e0c
--- /dev/null
+++ b/roles/ganesha/templates/ganesha-ha.conf.j2
@@ -0,0 +1,12 @@
+{% set members = groups['masters'] | union(groups['new_masters'] | default([])) | map('extract', hostvars, 'ands_hostname_storage') | list %}
+{% set vips = ands_ipfailover_vips | default([]) %}
+{% set n_vips = vips | length %}
+{% if n_vips > 0 %}
+{% set nodes = members[0:n_vips] %}
+HA_NAME="openshift_nfs"
+#HA_VOL_SERVER="{{ hostvars[groups['masters'][0]]['ands_hostname_storage'] }}"
+HA_CLUSTER_NODES="{{ nodes | join(',') }}"
+{% for node in nodes %}
+VIP_{{ node }}="{{ vips[loop.index - 1] }}"
+{% endfor %}
+{% endif %}