mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fix ec2 infinitely nested groups
The ec2 inventory module will incorrectly place parent groups as child groups of themselves, this fixes that.
This commit is contained in:
parent
508bffef02
commit
faeccb4e61
1 changed files with 3 additions and 1 deletions
|
@ -703,7 +703,8 @@ class Ec2Inventory(object):
|
||||||
self.push(self.inventory, key, dest)
|
self.push(self.inventory, key, dest)
|
||||||
if self.nested_groups:
|
if self.nested_groups:
|
||||||
self.push_group(self.inventory, 'tags', self.to_safe("tag_" + k))
|
self.push_group(self.inventory, 'tags', self.to_safe("tag_" + k))
|
||||||
self.push_group(self.inventory, self.to_safe("tag_" + k), key)
|
if v:
|
||||||
|
self.push_group(self.inventory, self.to_safe("tag_" + k), key)
|
||||||
|
|
||||||
# Inventory: Group by Route53 domain names if enabled
|
# Inventory: Group by Route53 domain names if enabled
|
||||||
if self.route53_enabled and self.group_by_route53_names:
|
if self.route53_enabled and self.group_by_route53_names:
|
||||||
|
@ -1309,3 +1310,4 @@ class Ec2Inventory(object):
|
||||||
|
|
||||||
# Run the script
|
# Run the script
|
||||||
Ec2Inventory()
|
Ec2Inventory()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue