Fix error on ec2 status change

Both `source_dest_check` and `termination_protection` variables are not
available within the scope of the startstopec2 instance method. This just
pulls them from module.params.
This commit is contained in:
fperks 2015-10-06 09:57:47 -04:00
parent 3a9d046f96
commit 7fd3262c3c

View file

@ -1228,6 +1228,8 @@ def startstop_instances(module, ec2, instance_ids, state, instance_tags):
wait_timeout = int(module.params.get('wait_timeout'))
changed = False
instance_dict_array = []
source_dest_check = module.params.get('source_dest_check')
termination_protection = module.params.get('termination_protection')
if not isinstance(instance_ids, list) or len(instance_ids) < 1:
# Fail unless the user defined instance tags