mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding 2 more groups of instances - instance types and key pairs
This commit is contained in:
parent
1b8d912d2a
commit
aa0434535e
1 changed files with 7 additions and 1 deletions
|
@ -298,7 +298,13 @@ class Ec2Inventory(object):
|
|||
|
||||
# Inventory: Group by availability zone
|
||||
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
|
||||
try:
|
||||
for group in instance.groups:
|
||||
|
|
Loading…
Reference in a new issue