-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin-playbook.yaml
30 lines (26 loc) · 965 Bytes
/
win-playbook.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- hosts: all
remote_user: Administrator
tasks:
# install packages
- name: install google chrome
chocolatey.chocolatey.win_chocolatey:
name:
- googlechrome
- notepadplusplus
# update windows
- name: Install all security, critical, and rollup updates without a scheduled task
ansible.windows.win_updates:
category_names:
- SecurityUpdates
- CriticalUpdates
- UpdateRollups
# One way to ensure the system is reliable just after a reboot, is to set WinRM to a delayed startup
- name: Ensure WinRM starts when the system has settled and is ready to work reliably
ansible.windows.win_service:
name: WinRM
start_mode: delayed
# Optionally, you can increase the reboot_timeout to survive long updates during reboot
- name: Ensure we wait long enough for the updates to be applied during reboot
ansible.windows.win_updates:
reboot: yes
reboot_timeout: 3600