From de410074cf5e1e8c2296ce821bc4455e3b7aa693 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 1 Feb 2018 15:18:10 +0100 Subject: Fix metadata access in OpenStack inventory Some versions of shade (e.g. the one currently in RHEL) only allow a dict-like interface. --- playbooks/openstack/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3