New in version 2.0.
parameter | required | default | choices | comments |
---|---|---|---|---|
category_names |
no | [u'CriticalUpdates', u'SecurityUpdates', u'UpdateRollups'] |
|
A scalar or list of categories to install updates from |
log_path |
no | If set, win_updates will append update progress to the specified file. The directory must already exist. | ||
state |
no | installed |
|
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:
name | description | returned | type | sample | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | dictionary | None | ||||||||||||||||||||||||||||||
contains: |
|
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is maintained by those with core commit privileges
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.