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!
On Wed, May 22, 2019 at 10:00 PM 'J Hawkesworth' via Ansible Project <
[email protected]> wrote:
>
> 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
>
> On Wednesday, May 22, 2019 at 11:36:39 AM UTC+1, new_ansible wrote:
>>
>> 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
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/13305499-fb6f-4797-ab77-43701448584f%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/13305499-fb6f-4797-ab77-43701448584f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CALJDb0nC5TaVp6GuSd-NcHTOaBC9xpafR1R86Csde46%3DhLSXgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.