mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Adding 2 more groups of instances - instance types and key pairs
This commit is contained in:
@@ -299,6 +299,12 @@ class Ec2Inventory(object):
|
|||||||
# Inventory: Group by availability zone
|
# Inventory: Group by availability zone
|
||||||
self.push(self.inventory, instance.placement, dest)
|
self.push(self.inventory, instance.placement, dest)
|
||||||
|
|
||||||
|
# Inventory: Group by instance type
|
||||||
|
self.push(self.inventory, self.to_safe('type_' + instance.instance_type), dest)
|
||||||
|
|
||||||
|
# Inventory: Group by key pair
|
||||||
|
self.push(self.inventory, self.to_safe('key_' + instance.key_name), dest)
|
||||||
|
|
||||||
# Inventory: Group by security group
|
# Inventory: Group by security group
|
||||||
try:
|
try:
|
||||||
for group in instance.groups:
|
for group in instance.groups:
|
||||||
|
|||||||
Reference in New Issue
Block a user