1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request from pas256/devel

Handle instances without keypairs
This commit is contained in:
Michael DeHaan 2012-11-08 16:43:30 -08:00
commit 603a5a0803

View file

@ -303,7 +303,8 @@ class Ec2Inventory(object):
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)
if instance.key_name != None:
self.push(self.inventory, self.to_safe('key_' + instance.key_name), dest)
# Inventory: Group by security group
try: