do not create group with region name if it is not given
Backport https://github.com/ansible/ansible/pull/42939

(cherry picked from commit d3f53b4b9f6167c359dae1069cb71eb10d00afc0)
pull/43364/head
Artem Goncharov 6 years ago committed by Matt Clay
parent b0a4627975
commit 0aa5d8ed45

@ -0,0 +1,2 @@
bugfixes:
- plugins/inventory/openstack.py - Do not create group with empty name if region is not set

@ -254,7 +254,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
groups.append(cloud)
# Create a group on region
groups.append(region)
if region:
groups.append(region)
# And one by cloud_region
groups.append("%s_%s" % (cloud, region))

Loading…
Cancel
Save