mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-30 08:56:51 +00:00
small changes
This commit is contained in:
1 parent
d65b7a5cd1
commit
9529181adb
2 files changed
+17
-134
No files matched your search
@@ -2,16 +2,18 @@
|
||||
- name: Configure WSUS server
|
||||
tags: configure_wsus
|
||||
block:
|
||||
#- name: Ensure Content directory exists
|
||||
# win_file:
|
||||
#- name: Check if Content directory already exists
|
||||
# win_stat:
|
||||
# path: "{{ wsus_content_directory }}"
|
||||
# state: directory
|
||||
# register: folder
|
||||
# failed_when: folder.stat.exists
|
||||
|
||||
#- 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
|
||||
# .\wsusutil.exe postinstall CONTENT_DIR={{ wsus_content_directory }}
|
||||
# when: not folder.stat.exists
|
||||
|
||||
- name: WSUS Script
|
||||
tags: wsus_script
|
||||
@@ -27,93 +29,3 @@
|
||||
#win_shell: "powershell {{ script_dir }}\\{{ wsus_script }}"
|
||||
#tags: apply_wsus_script
|
||||
|
||||
|
||||
|
||||
#- name: Ensure WSUS server is deployed (UpdateServicesDSC) - Errors here :(
|
||||
# tags: testing
|
||||
# win_dsc:
|
||||
# resource_name: UpdateServicesServer
|
||||
# Ensure: Present
|
||||
# ContentDir: '{{ wsus_content_directory }}'
|
||||
# Languages: en
|
||||
# #Products: "{{ wsus_products }}"
|
||||
# Products: "Windows Admin Center"
|
||||
# PsDscRunAsCredential_username: Administrator
|
||||
# PsDscRunAsCredential_password: "{{ ansible_password }}"
|
||||
# #ErrorRecord: test
|
||||
# Classifications:
|
||||
# - "{{ CriticalUpdates }}"
|
||||
# #- "{{ DefinitionUpdates }}"
|
||||
# #- "{{ SecurityUpdates }}"
|
||||
# #- "{{ ServicePacks }}"
|
||||
# #- "{{ UpdateRollups }}"
|
||||
# #- "{{ Updates }}"
|
||||
# #Synchronize: True
|
||||
# SynchronizeAutomatically: True
|
||||
# SynchronizeAutomaticallyTimeOfDay: '15:30:00'
|
||||
# ClientTargetingMode: "{{ wsus_client_targeting_mode }}"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##- name: Configure WSUS server
|
||||
## block:
|
||||
## - name: Ensure Content directory exists
|
||||
## win_file:
|
||||
## path: '{{ wsus_content_dir }}'
|
||||
## state: directory
|
||||
## - name: Ensure WSUS server is deployed (UpdateServicesDSC) - Errors here :(
|
||||
## win_dsc:
|
||||
## resource_name: UpdateServicesServer
|
||||
## Ensure: Present
|
||||
## ContentDir: '{{ wsus_content_dir }}'
|
||||
## Languages: en
|
||||
## Products: "{{ wsus_products }}"
|
||||
## Classifications:
|
||||
## - "{{ wsus_category_names['CriticalUpdates'].id }}"
|
||||
## #- "{{ wsus_category_names['DefinitionUpdates'].id }}"
|
||||
## #- "{{ wsus_category_names['SecurityUpdates'].id }}"
|
||||
## #- "{{ wsus_category_names['ServicePacks'].id }}"
|
||||
## #- "{{ wsus_category_names['UpdateRollups'].id }}"
|
||||
## #- "{{ wsus_category_names['Updates'].id }}"
|
||||
## # Ignore upstream as we don't have one yet...
|
||||
## #UpstreamServerName: "{{ wsus_upstream_server_name | default(omit) }}"
|
||||
## #UpstreamServerPort: "{{ wsus_upstream_server_port | default(omit) }}"
|
||||
## #UpstreamServerSSL: "{{ wsus_upstream_server_ssl | default(omit) }}"
|
||||
## Synchronize: True
|
||||
## SynchronizeAutomatically: True
|
||||
## SynchronizeAutomaticallyTimeOfDay: '01:30:00'
|
||||
## ClientTargetingMode: "{{ wsus_client_targeting_mode }}"
|
||||
## ignore_errors: true
|
||||
## retries: 2
|
||||
## - name: Apply approval rules (UpdateServicesDSC)
|
||||
## win_dsc:
|
||||
## resource_name: UpdateServicesApprovalRule
|
||||
## Name: "{{ wsus_category_names[item].name }}"
|
||||
## Classifications: "{{ wsus_category_names[item].id }}"
|
||||
## Enabled: True
|
||||
## RunRuleNow: True
|
||||
## loop:
|
||||
## - CriticalUpdates
|
||||
## #- DefinitionUpdates
|
||||
## #- SecurityUpdates
|
||||
## #- ServicePacks
|
||||
## #- UpdateRollups
|
||||
## #- Updates
|
||||
## - name: Clean up updates (UpdateServicesDSC)
|
||||
## win_dsc:
|
||||
## resource_name: UpdateServicesCleanup
|
||||
## Ensure: Present
|
||||
## DeclineExpiredUpdates: True
|
||||
## DeclineSupersededUpdates: True
|
||||
## CleanupObsoleteUpdates: True
|
||||
## CleanupUnneededContentFiles: True
|
||||
## # Might be handy: https://github.com/slopez888/vsphere-ansible/blob/master/roles/wsus-server-configure/tasks/max_xml_per_request.yml
|
||||
## - name: obtain WSUS DB name
|
||||
## win_reg_stat:
|
||||
## path: HKLM:\SOFTWARE\Microsoft\Update Services\Server\Setup
|
||||
## name: SqlDatabaseName
|
||||
## register: wsus_db_name
|
||||
## when: inventory_hostname in groups['meta-Tags_wsus']
|
||||
Reference in new issue
Block a user