mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
Include ec2 inventory changes from https://github.com/ansible/ansible/pull/11293.
Include ec2.ini doc changes from https://github.com/ansible/ansible/pull/11236 and https://github.com/ansible/ansible/pull/11409.
This commit is contained in:
@@ -520,7 +520,10 @@ class Ec2Inventory(object):
|
||||
# Inventory: Group by tag keys
|
||||
if self.group_by_tag_keys:
|
||||
for k, v in instance.tags.items():
|
||||
key = self.to_safe("tag_" + k + "=" + v)
|
||||
if v:
|
||||
key = self.to_safe("tag_" + k + "=" + v)
|
||||
else:
|
||||
key = self.to_safe("tag_" + k)
|
||||
self.push(self.inventory, key, dest)
|
||||
if self.nested_groups:
|
||||
self.push_group(self.inventory, 'tags', self.to_safe("tag_" + k))
|
||||
|
||||
Reference in New Issue
Block a user