Skip to content

Commit

Permalink
While I haven't done this, it is possible to bring up an instance
Browse files Browse the repository at this point in the history
without a keypair, so this takes care of that scenario
  • Loading branch information
Peter Sankauskas committed Nov 8, 2012
1 parent 36c1b4b commit 39efcd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/inventory/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ def add_instance(self, instance, region):
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:
Expand Down

0 comments on commit 39efcd0

Please sign in to comment.