[ansible-project] Re: Playbook for windows updates.

2017-09-25 Thread Mike Klebolt
The win_updates module will give a reboot_required: True return value when one is required. With that information you can register the task and then have a follow up win_reboot task when reboot_required: True. See below for how to accomplish this. - name: Install Windows Updates win_update

[ansible-project] Re: Playbook for windows updates.

2017-09-26 Thread Sunil Kumar
Hey Mike, What you given is absolutely correct. But i was blocked with different condition. While patching some updates won't move forward without restart. in that case if i restart the connection established with ansible server will lost. For that i am using pause module in ansible. Once that

[ansible-project] Re: Playbook for windows updates.

2017-09-27 Thread Jordan Borean
Hey Sunil You should be using the win_reboot module to handle updates. It reboots the server and waits for it to come back online so it should be seemless and won't continue until it is ready for another task. Your playbook would look something like this - name: install updates hosts: window

[ansible-project] Re: Playbook for windows updates.

2017-10-04 Thread Sunil Kumar
Hi Jordon, I am almost there. Your code is working absolutely fine. But need to handle below logic. 1) We can't say how many updates will ask for reboot so having win_updates multiple times in playbook can't work (we cannot hard code) --> If we have the logic when ever reboot is triggered the

[ansible-project] Re: Playbook for windows updates.

2017-10-05 Thread Sivakumar Lakshminarayanan
Me too new just from my scenario I am suggesting to use a handler on play book level. And then added a notify to handler on each task where I expect a reboot to be done. Below is a trial run we did. . ├── README.md ├── ansible.cfg ├── group_vars │ ├── all │ ├── ccenter.yml │ ├── linux.yml