summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2018-02-01 15:18:10 +0100
committerTomas Sedovic <tomas@sedovic.cz>2018-02-14 11:35:23 +0100
commitde410074cf5e1e8c2296ce821bc4455e3b7aa693 (patch)
treeb72da2f039cf53c23dcf791fd820cd6b44921128 /playbooks
parentea96a91a2775321aa60062e25934e22ad8be9de3 (diff)
downloadopenshift-de410074cf5e1e8c2296ce821bc4455e3b7aa693.tar.gz
openshift-de410074cf5e1e8c2296ce821bc4455e3b7aa693.tar.bz2
openshift-de410074cf5e1e8c2296ce821bc4455e3b7aa693.tar.xz
openshift-de410074cf5e1e8c2296ce821bc4455e3b7aa693.zip
Fix metadata access in OpenStack inventory
Some versions of shade (e.g. the one currently in RHEL) only allow a dict-like interface.
Diffstat (limited to 'playbooks')
-rwxr-xr-xplaybooks/openstack/inventory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/playbooks/openstack/inventory.py b/playbooks/openstack/inventory.py
index d5a8c3e24..c16a9e228 100755
--- a/playbooks/openstack/inventory.py
+++ b/playbooks/openstack/inventory.py
@@ -89,7 +89,7 @@ def build_inventory():
for server in cluster_hosts:
if 'group' in server.metadata:
- group = server.metadata.group
+ group = server.metadata.get('group')
if group not in inventory:
inventory[group] = {'hosts': []}
inventory[group]['hosts'].append(server.name)