try to improve updating

This commit is contained in:
L3D 2022-12-31 22:58:55 +01:00
parent ed45cddfcb
commit 8d78edd9dd
Signed by: l3d
GPG key ID: CD08445BFF4313D1

View file

@ -35,14 +35,41 @@
ansible.builtin.debug: ansible.builtin.debug:
var: ansible_os_license_status var: ansible_os_license_status
- name: Install all security updates with automatic reboots - name: Install Windows Updates
ansible.windows.win_updates: ansible.windows.win_updates:
category_names: category_names:
- SecurityUpdates - SecurityUpdates
- CriticalUpdates - CriticalUpdates
reboot: true - UpdateRollups
- Updates
reboot: false
register: res
- name: Install all critical and rollup updates without a scheduled task - name: Host is rebooting in 15 sec!!
ansible.windows.win_reboot:
pre_reboot_delay: 15
when:
- res.reboot_required | bool
- name: Post Update Check
ansible.windows.win_updates: ansible.windows.win_updates:
category_names: category_names:
- Application
- Connectors
- CriticalUpdates
- DefinitionUpdates
- DeveloperKits
- FeaturePacks
- Guidance
- SecurityUpdates
- ServicePacks
- Tools
- UpdateRollups - UpdateRollups
- Updates
register: res
- name: Host is rebooting in 15 sec!!
ansible.windows.win_reboot:
pre_reboot_delay: 15
when:
- res.reboot_required | bool