try to improve updating
This commit is contained in:
parent
ed45cddfcb
commit
8d78edd9dd
1 changed files with 30 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue