May201715

With my new job title of Linux System Administrator (more correctly “Administrateur Systèmes Linux“), there are some new things I have had to learn. One is the wonderful world of Ansible.

However, there is one thing that plagued me, rebooting the system and having it wait to run the next command. This is important for patching up a server then making sure everything came back up alright.

After scouring the web and trying out every post I found. I found a post that I was able to piece together other’s response to get a valid, working, solution.

Thank you to gvenka008c and andyhky who’s answers were what i needed to piece together the correct metod.

If you omit the “sleep 2 &&” The server disconnects before it can run the wait command. If you use “async: 0” (as it describes in many posts online) it disconnects as well. The above worked perfectly for me.

Hope this helps other Ansible users find hope as the net is filled with so many possibilities, not all of them functional or recent.

Leave a Comment