Hi,
I am trying to figure out if there is a way to terminate instance which are
in private subnet behind ELB using dynamic inventory.
I have my ansible script as follows
- hosts: localhost
serial: 1
tasks:
- name: Terminate {{ec2_id}} instance in {{aws_region}}
local_action:
module: ec2
state: 'absent'
region: '{{region}}'
instance_ids: '{{ec2_id}}'
Now the issue is that ; the instance do not have a public IP, if I am
modifying ec2.ini to get private IP and set hosts to like
tag_Name_webservers
then ansible tries to SSH inside the instance and fails.
If I set it to localhost it is not able to get the instance_id and exits
with ec2_id not found
Can anyone direct me with a correct method to do this ?
Thank you
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/539416b5-52f1-4ae0-8cf4-73bc513965da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.