Commit c6151615 by John Jarvis

only deregister if an instance was found

parent 6fcd2b7e
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
ec2_elbs: ec2_elbs:
- "{{ elb }}" - "{{ elb }}"
state: absent state: absent
when: terminate_instance == true and elb when: terminate_instance == true and elb and tag_lookup.instance_ids|length == 1
- name: launch_ec2 | Launch ec2 instance - name: launch_ec2 | Launch ec2 instance
local_action: local_action:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment