I just wanted to chime in that I have this same question and to hopefully
bring some attention to this since it's been a few months. I'm honestly
starting to think that maybe this is a bug and should be reported on GitHub
and that this module doesn't actually support retries...
My Ansible code is similar except I'm doing retries to catch patching
failures, not specifically for reboots.
- name: Install all updates except preview releases
win_updates:
category_names:
- SecurityUpdates
- CriticalUpdates
- UpdateRollups
- Application
- DefinitionUpdates
- Updates
- Tools
- ServicePacks
reboot: yes
state: installed
reboot_timeout: 7200
blacklist:
- ".*.Preview of.*."
log_path: c:\Windows\TEMP\ansible_patching.log
register: updates_install
retries: 3
until: updates_install is succeeded
This fails if any updates require a reboot with error:
msg: A reboot is required before more updates can be installed
--
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/f0d6567f-ad18-40bf-9262-3641d00c4d81%40googlegroups.com.