Copy and run script for WSUS

This commit is contained in:
abrown38 committed 2024-10-09 10:43:43 +01:00
1 parent 1b11f707c7
commit ae47d176c0
4 files changed
+27 -6

No files matched your search

+22 -6
View File
@@ -7,11 +7,27 @@
path: "{{ wsus_content_directory }}"
state: directory
- name: Set WSUS Content Directory
tags: set_wsus_content_dir
win_shell: |
CD "C:\Program Files\Update Services\Tools"
.\wsusutil.exe postinstall CONTENT_DIR=W:\WSUS
- name: Set WSUS Content Directory
tags: set_wsus_content_dir
win_shell: |
CD "C:\Program Files\Update Services\Tools"
.\wsusutil.exe postinstall CONTENT_DIR=W:\WSUS
- name: WSUS Script
tags: wsus_script
block:
- name: Copy WSUS script
win_copy:
src: "{{ wsus_script }}"
dest: "powershell {{ script_dir }}\\{{ wsus_script }}"
force: true
tags: copy_wsus_script
- name: Apply WSUS script
win_shell: "powershell {{ script_dir }}\\{{ wsus_script }}"
tags: apply_wsus_script
#- name: Ensure WSUS server is deployed (UpdateServicesDSC) - Errors here :(
# tags: testing
@@ -100,4 +116,4 @@
## path: HKLM:\SOFTWARE\Microsoft\Update Services\Server\Setup
## name: SqlDatabaseName
## register: wsus_db_name
## when: inventory_hostname in groups['meta-Tags_wsus']
## when: inventory_hostname in groups['meta-Tags_wsus']