Fix ec2 module source_dest_check when running on non VPC instances (EC2 Classic) (#3243)

This commit is contained in:
Florian Dambrine 2016-09-08 04:25:17 -06:00 committed by Matt Clay
parent d6e16ded3f
commit 2adc325ef6

View file

@ -1306,7 +1306,7 @@ def startstop_instances(module, ec2, instance_ids, state, instance_tags):
for inst in res.instances: for inst in res.instances:
# Check "source_dest_check" attribute # Check "source_dest_check" attribute
if inst.get_attribute('sourceDestCheck')['sourceDestCheck'] != source_dest_check: if inst.vpc_id is not None and inst.get_attribute('sourceDestCheck')['sourceDestCheck'] != source_dest_check:
inst.modify_attribute('sourceDestCheck', source_dest_check) inst.modify_attribute('sourceDestCheck', source_dest_check)
changed = True changed = True