mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix ec2 module source_dest_check when running on non VPC instances (EC2 Classic) (#3243)
This commit is contained in:
committed by
Matt Clay
parent
d6e16ded3f
commit
2adc325ef6
@@ -1306,7 +1306,7 @@ def startstop_instances(module, ec2, instance_ids, state, instance_tags):
|
||||
for inst in res.instances:
|
||||
|
||||
# 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)
|
||||
changed = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user