forked from oatakan/ansible-windows-wsus-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapply_patch.yml
More file actions
executable file
·42 lines (37 loc) · 1.32 KB
/
Copy pathapply_patch.yml
File metadata and controls
executable file
·42 lines (37 loc) · 1.32 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
- name: install Windows Updates
hosts: all
vars:
hotfix_download_location: "{{ ansible_env.TEMP }}"
hotfixes:
- kb: KB2883201
file: Windows8-RT-KB2883201-x64.msu
url: https://download.microsoft.com/download/C/A/A/CAA19F2F-ED39-4729-BB13-8190290473C1/Windows8-RT-KB2883201-x64.msu
tasks:
- block:
- name: ensure Windows ADK with DISM is installed
win_chocolatey:
name: windows-adk-deploy
state: present
version: 10.0.17134.0
register: install_windows_adk_deploy
- name: ensure PATH contains Windows ADK
win_path:
scope: machine
state: present
elements: "C:\\Program Files (x86)\\Windows Kits\\10\\Assessment and Deployment Kit\\Deployment Tools\\amd64\\DISM"
when: "'2008' in ansible_distribution"
- name: download hotfix
win_get_url:
url: '{{ item.url }}'
dest: '{{ hotfix_download_location }}\{{ item.file }}'
loop: "{{ hotfixes }}"
- name: install hotfix
win_hotfix:
hotfix_kb: '{{ item.kb }}'
source: '{{ hotfix_download_location }}\{{ item.file }}'
state: present
register: hotfix_install
loop: "{{ hotfixes }}"
- name: debug hotfix installation result
debug:
var: hotfix_install