New in version 2.0.
||no||[u'CriticalUpdates', u'SecurityUpdates', u'UpdateRollups']||
A scalar or list of categories to install updates from
Controls whether found updates are returned as a list or actually installed.
This module also supports Ansible check mode, which has the same effect as setting state=searched
# Install all security, critical, and rollup updates - win_updates: category_names: - SecurityUpdates - CriticalUpdates - UpdateRollups # Install only security updates - win_updates: category_names: SecurityUpdates # Search-only, return list of found updates (if any), log to c:\ansible_wu.txt - win_updates: category_names: SecurityUpdates state: searched log_path: c:\ansible_wu.txt
Common return values are documented here Return Values, the following are the fields unique to this module:
|installed_update_count||The number of updates successfully installed||success||int||2|
|reboot_required||True when the target server requires a reboot to complete updates (no further updates can be installed until after a reboot)||success||boolean||True|
|failed_update_count||The number of updates that failed to install||always||int||0|
|found_update_count||The number of updates found needing to be applied||success||int||3|
|updates||List of updates that were found/installed||success||complex||None|
win_updatesmust be run by a user with membership in the local Administrators group
win_updateswill use the default update service configured for the machine (Windows Update, Microsoft Update, WSUS, etc)
win_updatesdoes not manage reboots, but will signal when a reboot is required with the reboot_required return value.
win_updatescan take a significant amount of time to complete (hours, in some cases). Performance depends on many factors, including OS version, number of updates, system load, and update server load.
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.