Hello All!
I need to uninstall the windows install package with KB article with help of ansible.
the win_update is not happy with ‘absent’
Please help.
Thanks
Hello All!
I need to uninstall the windows install package with KB article with help of ansible.
the win_update is not happy with ‘absent’
Please help.
Thanks
Hmm, I have not had to do this myself. One thing you could try is using wusa, although I think you may well have to use ‘become’ on your task as I believe wusa won’t run in a ‘normal’ ansible remote login
- name: uninstall KB1234
win_shell: wusa /uninstall /kb:1234
become: yes
Hope this helps,
Jon
Hello Jon,
Thanks.
I worked but to restart the os after uninstall , i am using this :
name: uninstall kb
win_shell: WUSA /uninstall /kb:{{ kbno }} /quiet /norestart
register: uninstall
debug: var=“uninstall”
win_reboot:
when: uninstall.rc == 0
reboot_timeout: 1500
post_reboot_delay: 100
if the uninstall is successful.
Since without " /quiet /norestart " the job was getting stuck as it needed user input to whether restart or not at windows server side.
Is there any better way to handle the user input to restart if required in playbook.
Thanks!
I am struggling with a proper way to remove a patch KB your method is failing for me