diff options
author | Scott Dodson <sdodson@redhat.com> | 2018-02-06 21:53:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 21:53:36 -0500 |
commit | 4829d3b280801ae4b8530d2de29fdcf5328e26cb (patch) | |
tree | e898397bb84473626918e4731f9cb7a52c57f5d2 /roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2 | |
parent | 9cdf6e8a3dc1d4ff399e3d85fe7e8b6d38ab92a4 (diff) | |
parent | 5402ff05c7f5695bbe60cb6966e57a038c4fe1c0 (diff) | |
download | openshift-4829d3b280801ae4b8530d2de29fdcf5328e26cb.tar.gz openshift-4829d3b280801ae4b8530d2de29fdcf5328e26cb.tar.bz2 openshift-4829d3b280801ae4b8530d2de29fdcf5328e26cb.tar.xz openshift-4829d3b280801ae4b8530d2de29fdcf5328e26cb.zip |
Merge pull request #7015 from sdodson/v310
Initial support for 3.10
Diffstat (limited to 'roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2')
-rw-r--r-- | roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2 b/roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2 new file mode 100644 index 000000000..d6c28f6dd --- /dev/null +++ b/roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2 @@ -0,0 +1,49 @@ +{ + "clusters": [ +{%- set clusters = {} -%} +{%- for node in glusterfs_nodes -%} + {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%} + {%- if cluster in clusters -%} + {%- set _dummy = clusters[cluster].append(node) -%} + {%- else -%} + {%- set _dummy = clusters.update({cluster: [ node, ]}) -%} + {%- endif -%} +{%- endfor -%} +{%- for cluster in clusters -%} + { + "nodes": [ +{%- for node in clusters[cluster] -%} + { + "node": { + "hostnames": { + "manage": [ +{%- if 'glusterfs_hostname' in hostvars[node] -%} + "{{ hostvars[node].glusterfs_hostname }}" +{%- elif 'openshift' in hostvars[node] -%} + "{{ hostvars[node].openshift.node.nodename }}" +{%- else -%} + "{{ node }}" +{%- endif -%} + ], + "storage": [ +{%- if 'glusterfs_ip' in hostvars[node] -%} + "{{ hostvars[node].glusterfs_ip }}" +{%- else -%} + "{{ hostvars[node].openshift.common.ip }}" +{%- endif -%} + ] + }, + "zone": {{ hostvars[node].glusterfs_zone | default(1) }} + }, + "devices": [ +{%- for device in hostvars[node].glusterfs_devices -%} + "{{ device }}"{% if not loop.last %},{% endif %} +{%- endfor -%} + ] + }{% if not loop.last %},{% endif %} +{%- endfor -%} + ] + }{% if not loop.last %},{% endif %} +{%- endfor -%} + ] +} |