That should say "item not in groups['all']" BTW ...
On Tue, Apr 15, 2014 at 5:35 PM, Michael DeHaan <[email protected]> wrote: > Possible suggestion: > > - hosts: localhost > tasks: > - fail: msg="{{ host }} not running" > when: item in groups['all'] > with_items: > - host1.example.com > - host2.example.com > > # rest of playbook could go here > > > On Tue, Apr 15, 2014 at 10:59 AM, James Carroll < > [email protected]> wrote: > >> Howdy all, >> I'm trying to create a playbook that would insure that a certain set of >> EC2 instances is running before initiating a process. I've played with the >> EC2 dynamic inventory but it seems to return only instances that are >> already running and I didn't see anything in the ini that would tell it to >> pull everything. As a second question, assuming I can get the complete >> list is "running" a valid state/parameter for the EC2 module. Something >> like: >> >> --- >> - name: Make sure the machine is awake: >> module: ec2 >> state: running >> wait: True >> >> - name: Fire the process >> shell: ./etc/myutils/backup.sh >> >> Thanks, >> James >> >> __________________________________________________________________ >> The information contained in this email message and any attachment may be >> privileged, confidential, proprietary or otherwise protected from >> disclosure. If the reader of this message is not the intended recipient, you >> are hereby notified that any dissemination, distribution, copying or use of >> this message and any attachment is strictly prohibited. If you have received >> this message in error, please notify us immediately by replying to the >> message and permanently delete it from your computer and destroy any >> printout thereof. >> >> -- >> 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/a017cd16-c061-43a1-bd61-5aea5d323cd2%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/a017cd16-c061-43a1-bd61-5aea5d323cd2%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/CA%2BnsWgwyu1Odd5Jeq8EK1nbjx8zL6DXaFEBiQV0i6bweEzxkOQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
