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