On Mon, Mar 10, 2014 at 1:22 PM, <[email protected]> wrote:
> Just trying to understand: what is your proposed solution for, say
> 'starting all EC2 VMs that match tag_env_prod in zone US-WEST-1'?
>
You can iterate over hosts and check states like so:
- hosts: localhost
tasks:
- shell: blah
when: hostvars[item][ec2_state] == blah and item in
hostvars[item]['ec2_region'] == blah
with_items: groups.tag_env_prod
The region should also be available as a group:
when: item in groups.foo
etc
--
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/CAEVJ8QNgqXY34O7_myRhFjxByuW3k9Ls5M3OhvYGNEaV2cW4ZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.