fix target_id parameter and state

This commit is contained in:
Bryan Black 2020-10-30 01:56:42 +00:00
parent fb662f2ecf
commit 8f2d4df322

View file

@ -35,7 +35,7 @@
community.aws.elb_target:
target_group_arn: "{{ target_group_arn }}"
state: absent
target_id: "i-0c6411e58bbaccfad"
target_id: "{{ hostvars[inventory_hostname].instance_id }}"
target_status: "unused"
deregister_unused: yes
when: targetpractice == "false"
@ -44,6 +44,6 @@
amazon.aws.ec2:
instance_ids: "{{ hostvars[inventory_hostname].instance_id }}"
#instance_ids: "{{ play_hosts }}"
state: running
state: stopped
when: targetpractice == "false"