Sergey Arlashin
unread,Nov 20, 2018, 9:04:22 AM11/20/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi!
We have an EC2 autoscaling group in AWS environment. We'd like to execute shell scripts on EC2 instances launched within this ASG with Ansible.
For that I'm using ec2.py script.
Each instance in this ASG has tag "Inventory_Group = testenv-autoscale".
when I launch ./ec2.py script, I get the following output for this tag
"tag_Inventory_Group_ testenv_autoscale": [
"testenv_autoscale",
"testenv_autoscale",
"testenv_autoscale",
"testenv_autoscale"
],
However there is only one record for testenv_autoscale host
"testenv_autoscale": {
"ansible_host": "10.1.1.10",
...
...
}
And when I execute ansible filtering by "tag_Inventory_Group_ testenv_autoscale" I get connected only to 1 host in the group.
All testenv_autoscale instances are properly tagged.
So my question is - what can be wrong with either ec2.py script or my set up?
Thanks!
Regards,
Sergey