summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/sample-inventory/inventory.py
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-05 08:57:05 -0800
committerGitHub <noreply@github.com>2018-01-05 08:57:05 -0800
commitcaec381b6cd0ea632cfe927c23b6229ab69e834a (patch)
treed135d0e5a3fb5f6e3474b84fc6a700ebe6310970 /playbooks/openstack/sample-inventory/inventory.py
parent38fd87868572e1cd45b645896fc47b6577271df4 (diff)
parent4514a0ddb20480d43f153f25de94a267f10f0696 (diff)
downloadopenshift-caec381b6cd0ea632cfe927c23b6229ab69e834a.tar.gz
openshift-caec381b6cd0ea632cfe927c23b6229ab69e834a.tar.bz2
openshift-caec381b6cd0ea632cfe927c23b6229ab69e834a.tar.xz
openshift-caec381b6cd0ea632cfe927c23b6229ab69e834a.zip
Merge pull request #6532 from jmencak/heat_stack-cns
Automatic merge from submit-queue. OpenStack provisioning -- support cns. Initial support for CNS nodes during OpenShift on OpenStack provisioning.
Diffstat (limited to 'playbooks/openstack/sample-inventory/inventory.py')
-rwxr-xr-xplaybooks/openstack/sample-inventory/inventory.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/playbooks/openstack/sample-inventory/inventory.py b/playbooks/openstack/sample-inventory/inventory.py
index ad3fd936b..084b5c0a0 100755
--- a/playbooks/openstack/sample-inventory/inventory.py
+++ b/playbooks/openstack/sample-inventory/inventory.py
@@ -42,7 +42,10 @@ def build_inventory():
if server.metadata['host-type'] == 'node' and
server.metadata['sub-host-type'] == 'app']
- nodes = list(set(masters + infra_hosts + app))
+ cns = [server.name for server in cluster_hosts
+ if server.metadata['host-type'] == 'cns']
+
+ nodes = list(set(masters + infra_hosts + app + cns))
dns = [server.name for server in cluster_hosts
if server.metadata['host-type'] == 'dns']
@@ -59,6 +62,7 @@ def build_inventory():
inventory['nodes'] = {'hosts': nodes}
inventory['infra_hosts'] = {'hosts': infra_hosts}
inventory['app'] = {'hosts': app}
+ inventory['glusterfs'] = {'hosts': cns}
inventory['dns'] = {'hosts': dns}
inventory['lb'] = {'hosts': load_balancers}
@@ -93,6 +97,9 @@ def build_inventory():
hostvars['openshift_hostname'] = server.private_v4
hostvars['openshift_public_hostname'] = server.name
+ if server.metadata['host-type'] == 'cns':
+ hostvars['glusterfs_devices'] = ['/dev/nvme0n1']
+
node_labels = server.metadata.get('node_labels')
if node_labels:
hostvars['openshift_node_labels'] = node_labels