mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Do not create group with empty name when region (optional argument) is not given in the openstack connection
This commit is contained in:
parent
605a90dfeb
commit
6667ec4474
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/42042-inventory_with_no_region.yaml
Normal file
2
changelogs/fragments/42042-inventory_with_no_region.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- plugins/inventory/openstack.py - Do not create group with empty name if region is not set
|
|
@ -258,7 +258,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…
Reference in a new issue