nice thank you.
Do I need to specify the win_reboot module?
here is my playbook
---
- name: Install all critical and security updates
hosts: all
tasks:
- name: Install windows updates
win_updates:
category_names:
- CriticalUpdates
- SecurityUpdates
server_selection: windows_update
state: downloaded
log_path: c:\ansible_wu.txt
register: update_result
reboot: yes
reboot_timeout: 60
also noticed that when installing windows update there is no progress bar
or cant see the progress. is there a way to get that from ansible?
On Thursday, May 14, 2020 at 1:52:10 PM UTC-7, Jordan Borean wrote:
>
> TASK [Reboot host if required]
>> ******************************************************************************************
>> fatal: [10.50.1.231]: FAILED! => {"changed": false, "msg": "Invalid
>> options for win_reboot: when"}
>>
>
> I can't see you task but this sounds like your when clause is not indented
> correctly. You have it as a module option for win_reboot when it should be
> on the same indentation as the module name.
>
>> Just found out when I run windows update manually on the machine, there
>> were 3 updates that ansible didnt report back?
>>
>
> From your screenshot it indicated those updates are only available through
> the public Windows Update catalogue and not your org's WSUS catalog. The
> win_updates module defaults to whatever the OS settings are so if you have
> a WSUS server configured it will only look there by default. In Ansible 2.8
> and newer you can use the 'server_selection' option as documented [1] to
> force win_updates to check the public Windows update catalog and not the
> configured WSUS server.
>
> [1] -
> https://docs.ansible.com/ansible/latest/modules/win_updates_module.html
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5ff8d90b-95d7-44cd-aba7-5c8371b4d64e%40googlegroups.com.