From 168fcb0a4af766692b198ba29f9f54648563d25c Mon Sep 17 00:00:00 2001 From: Tim Gerla Date: Wed, 30 Jan 2013 11:01:25 -0800 Subject: [PATCH] Only inventory "running" EC2 instances. "stopped" is also a valid state and these should not be inventoried. --- plugins/inventory/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index 7ac3aa96191..fcad5703ee4 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -274,7 +274,7 @@ class Ec2Inventory(object): addressable ''' # Only want running instances - if instance.state == 'terminated': + if instance.state != 'running': return # Select the best destination address