This is a great place to use the "wait_for" module to wait for the port to become open.
On Wed, Dec 11, 2013 at 9:31 AM, Aaron Hunter <[email protected]>wrote: > I have a complex playbook that will provision a CentOS VM on a XenServer > pool from scratch and then configure the VM according to its roles. It > works very well (and I'm very impressed with Ansible) except for one part. > As XenServer installs the VM and OS (via a delegate_to call in the Task) > it takes time and the VM is not yet online. The next step in my Ansible > script tries to connect to the new and still offline VM and promptly fails. > Neither 'async' nor 'do-until' have worked. It always fails because Ansible > cannot connect via SSH to the newly spun up VM. > > My question is, how can I get this task to keep trying to connect? I could > not find anything in the docs or Google to suggest an approach. > > Thank you, > Aaron > > DevOps Blog: http://www.sharknet.us > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Michael DeHaan <[email protected]> CTO, AnsibleWorks, Inc. http://www.ansibleworks.com/ -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
