There's a wait option on ec2 instance creation that will stop the playbook until the instance is up. Not sure what exactly it is testing, but I've seen it there.
A primitive alternative is just to stick a one-minute (or whatever is needed) delay into the playbook. You can also put a delay loop in. See this link and seach for "Retrying": https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html Regards, K. On Mon, Aug 19, 2019 at 10:52 AM Jim Robinson <[email protected]> wrote: > I'm not sure whether this is something ansible can do out of the box or > not. > > I am looking for a way to pause execution of a playbook until certain > pieces of metadata become available from AWS. > > Basically I'm starting an ec2 instance inside a firewalled VPC in AWS and > when it's ready it sets a few tag values. > > I'd like to be able to construct tasks that spin up this ec2 instance, > wait until it sees those tags are available (or times out), and then > continue. > > Is this possible using the standard ansible toolkit, or am I (a) going > about this all wrong, or (b) going to need to reach for a custom coded > module? > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/749822ac-0100-4bb8-83e5-f28ee777a1b3%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/749822ac-0100-4bb8-83e5-f28ee777a1b3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Karl Auer Email : [email protected] Website: http://2pisoftware.com GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E Previous: 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08SCxt1yZf1K9jJgFxq-1Dpo46HVFN4a6emeUbYH3W81jg%40mail.gmail.com.
