diff --git a/site.yml b/site.yml index d12bea0..fa05482 100644 --- a/site.yml +++ b/site.yml @@ -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"