Reboot validator for nero 104/27/2023 ![]() ![]() Shell: "yum -y update" register: patchresult ![]() It performs yum update and reboot the box and print the uptime The Ansible Playbook with wait_for module - name: Patch the server and Reboot In this post, we are going to see wait_for and wait_for_connection modules of ansible to get our task accomplishedĬonsider the following playbook I have created for linux patching. Since the reboot module of Ansible 2.7 is very simple and efficient and also considering that most people is still behind ansible 2.7. There are many methods to accomplish thisįor Ansible 2.7 and more – There is a dedicated reboot moduleįor previous versions – Either use wait_for or wait_for_connection How to reboot and wait for it to complete with ansible you might get your ansible play failed with the error “Shared connection closed”īut this can be avoided and you can reboot the box and wait for the server to come back up and execute the post-reboot validations or checks. As part of quarterly patching, we upgrade the installed software and packages and do various other stuff along with a final reboot to make the changes effective. For example, Take the Patching as an example. There are cases where we want our remote nodes to be rebooted or restarted. The purpose of this post is to explain with an example of how ansible initiate the reboot and wait for the reboot to complete The Ansible playbook with Wait_for_connection module.The Ansible Playbook with wait_for module.How to reboot and wait for it to complete with ansible. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |