We have multiple versions of a multi-tier application deployed on EC2.
Each instance is tagged with version and role.
Versions might be clustered (so could be multiple instances with same
version and role tag).
For example, we might have:
2 instances tagged version=1 and role=foo
2 instances tagged version=1 and role=bar
1 instance tagged version=2 and role=foo
1 instance tagged version=2 and role=bar
We want to use ansible to run a command on one instance of a specified
version/role.
What's the best way to do that?
I tried the following, but seems that the index applies to the individual
tag match -- not the result of the logical union.
$ ansible "tag_version_1:&tag_role_foo[0]" -m ping
No hosts matched
$ ansible "tag_version_1:&tag_role_foo" -m ping
10.0.14.123 | success >> {
"changed": false,
"ping": "pong"
}
Appreciate any advice!
-- Steve
--
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/11081e16-5d18-4732-8408-f0654743cda0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.