This a bad commit message. NO idea.

This commit is contained in:
2022-02-15 14:56:51 -05:00
parent 4a8ab6fc84
commit 3fb974987c
62 changed files with 421 additions and 1063 deletions

View File

@@ -10,9 +10,11 @@
- debug:
msg: |
{{ inventory_hostname }} has {{ available_updates.found_update_count }} updates available.
{% for key, value in available_updates.updates.items() %}
- {{ value.title }}
{% for update in updates %}
- {{ update.title }}
{% endfor %}
vars:
updates: "{{ (available_updates.updates.values() | list) if (available_updates.updates is mapping) else (available_updates.updates) }}"
when: available_updates.updates is defined
- include_tasks: updates-with-retry.yml
@@ -20,7 +22,7 @@
- available_updates.updates is defined
- available_updates.found_update_count > 0
- name: check for missing updates.
- name: check for missing updates
win_updates:
state: searched
register: available_updates

View File

@@ -16,9 +16,11 @@
- debug:
msg: |
{{ inventory_hostname }} has {{ available_updates.found_update_count }} updates available.
{% for key, value in available_updates.updates.items() %}
- {{ value.title }}
{% for update in updates %}
- {{ update.title }}
{% endfor %}
vars:
updates: "{{ (available_updates.updates.values() | list) if (available_updates.updates is mapping) else (available_updates.updates) }}"
when: available_updates.updates is defined
- block:
@@ -67,9 +69,11 @@
- debug:
msg: |
{{ inventory_hostname }} has {{ missing_updates.found_update_count }} updates still missing.
{% for key, value in missing_updates.updates.items() %}
- {{ value.title }}
{% for update in updates %}
- {{ update.title }}
{% endfor %}
vars:
updates: "{{ (missing_updates.updates.values() | list) if (missing_updates.updates is mapping) else (missing_updates.updates) }}"
when: missing_updates.updates is defined
- block:

View File

@@ -6,6 +6,7 @@
state: present
version: 10.0.17134.0
register: install_windows_adk_deploy
notify: ensure Windows ADK with DISM is removed
- name: ensure PATH contains Windows ADK
win_path:
@@ -13,19 +14,25 @@
state: present
elements: "C:\\Program Files (x86)\\Windows Kits\\10\\Assessment and Deployment Kit\\Deployment Tools\\amd64\\DISM"
- name: download hotfix group 1 (PS >= 4)
- name: download hotfix group 1
win_get_url:
url: '{{ item.url }}'
dest: '{{ hotfix_download_location }}\{{ item.file }}'
loop: "{{ hotfixes_group_1 }}"
- name: install hotfix group 1
win_hotfix:
source: '{{ hotfix_download_location }}\{{ item.file }}'
state: present
register: hotfix_install_group_1
loop: "{{ hotfixes_group_1 }}"
when: ansible_powershell_version is version('4', '>=')
- block:
- name: install hotfix group 1 (PS >= 4)
win_hotfix:
source: '{{ hotfix_download_location }}\{{ item.file }}'
state: present
register: hotfix_install_group_1
loop: "{{ hotfixes_group_1 }}"
when: ansible_powershell_version is version('4', '>=')
rescue:
- name: install hotfix using shell
win_shell: '{{ hotfix_download_location }}\{{ item.file }} /quiet /norestart'
register: hotfix_install_group_1
loop: "{{ hotfixes_group_1 }}"
- name: install hotfix (PS == 3)
win_shell: '{{ hotfix_download_location }}\{{ item.file }} /quiet /norestart'
@@ -56,9 +63,11 @@
- debug:
msg: |
{{ inventory_hostname }} has {{ available_updates.found_update_count }} updates available.
{% for key, value in available_updates.updates.items() %}
- {{ value.title }}
{% for update in updates %}
- {{ update.title }}
{% endfor %}
vars:
updates: "{{ (available_updates.updates.values() | list) if (available_updates.updates is mapping) else (available_updates.updates) }}"
when: available_updates.updates is defined
- include_tasks: updates-with-retry.yml
@@ -73,9 +82,4 @@
- name: list missing updates
debug:
var: available_updates
- name: make sure Windows ADK with DISM for Server 2008 R2 is not installed
win_chocolatey:
name: windows-adk-deploy
state: absent
var: available_updates

View File

@@ -58,9 +58,11 @@
- debug:
msg: |
{{ inventory_hostname }} has {{ missing_updates.found_update_count }} updates still missing.
{% for key, value in missing_updates.updates.items() %}
- {{ value.title }}
{% for update in updates %}
- {{ update.title }}
{% endfor %}
vars:
updates: "{{ (missing_updates.updates.values() | list) if (missing_updates.updates is mapping) else (missing_updates.updates) }}"
when: missing_updates.updates is defined
- name: still more updates - need to retry