Skip to content

Instantly share code, notes, and snippets.

@nidr0x
Created May 24, 2018 14:30
Show Gist options
  • Save nidr0x/a005cb529f152ad243f68643d9cee716 to your computer and use it in GitHub Desktop.
Save nidr0x/a005cb529f152ad243f68643d9cee716 to your computer and use it in GitHub Desktop.
- name: Download Hotfixes
win_get_url:
url: "{{ item.url }}"
dest: "C:/{{ item.kb }}.msu"
with_items:
- { kb: KB2919442, url: "https://download.microsoft.com/download/D/6/0/D60ED3E0-93A5-4505-8F6A-8D0A5DA16C8A/Windows8.1-KB2919442-x64.msu" }
- { kb: KB2919355, url: "https://download.microsoft.com/download/2/5/6/256CCCFB-5341-4A8D-A277-8A81B21A1E35/Windows8.1-KB2919355-x64.msu" }
- name: Install KB2919442 Hotfix
win_hotfix:
hotfix_kb: KB2919442
source: "C:/KB2919442.msu"
register: hotfix_KB2919442
- name: Install KB2919355 Hotfix
win_hotfix:
hotfix_kb: KB2919355
source: "C:/KB2919355.msu"
register: hotfix_KB2919355
- name: Remove Hotfix downloads
win_file:
path: "C:/{{ item }}.msu"
state: absent
with_items:
- KB2919442
- KB2912355
- win_reboot:
when: hotfix_KB2919442.reboot_required or hotfix_KB2919355.reboot_required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment