From 8f2d4df322e53065363fc06b3d6f760accebb925 Mon Sep 17 00:00:00 2001 From: Bryan Black <2366082-reel@users.noreply.gitlab.com> Date: Fri, 30 Oct 2020 01:56:42 +0000 Subject: [PATCH] fix target_id parameter and state --- site.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"