wait_for has a delay parameter so you can wait a given number of seconds
before checking for port uptime.

This is generally what I'd suggest.





On Sun, Dec 29, 2013 at 10:49 AM, Geoff Oakham <[email protected]> wrote:

> Hi everyone,
>
> I'm new to Ansible and I've been exploring it with Vagrant to perform some
> automated deployment tests for a project.  I'm enjoying it so far! As part
> of setting up the deployment environment, I need to adjust some kernel
> parameters which take effect at boot time.  It's easy to do: edit a file
> and reboot. I'm not sure how to do this using Ansible so that Ansible waits
> for the reboot to complete.
>
> My first thought was use a pre_task to set the kernel parameters and
> notify a 'reboot' handler like this http://pastebin.com/A5BwUkY9 .  But
> then other tasks would attempt to run in the middle of the reboot.  I tried
> to resolve this using the "wait_for: port=22", but no dice.. perhaps
> because the ssh daemon doesn't get killed before Ansible checks.
>
> Am I on the right track?  What am I missing?
>
> Thanks,
>
> Geoff
>
>  --
> 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].
> 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].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to