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