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:
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
That should say “item not in groups[‘all’]” BTW …