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.
pull/18777/head
fperks 9 years ago committed by Matt Clay
parent 3e6f39dd2b
commit 11dbd985b6

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

Loading…
Cancel
Save