Skip to content

Commit

Permalink
Only inventory "running" EC2 instances. "stopped" is also a valid sta…
Browse files Browse the repository at this point in the history
…te and these should not be inventoried.
  • Loading branch information
tgerla committed Jan 30, 2013
1 parent 0243b7b commit 168fcb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inventory/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def add_instance(self, instance, region):
addressable '''

# Only want running instances
if instance.state == 'terminated':
if instance.state != 'running':
return

# Select the best destination address
Expand Down

0 comments on commit 168fcb0

Please sign in to comment.