This role installs and configures the WSUS role for Windows 2016, and Windows 2019.
There are no special requirements apart from the standard items to allow Ansible to run on the target.
The following variables are defined in /vars/main.yml
:
wsus_install_management_tools
: Whether to install the WSUS MMC or not. Default isyes
wsus_content_folder
: Sets the folder location for WSUS to store its content. Default isC:\WSUS
wsus_script_folder
: Sets the folder for storing WSUS scripts. Default isC:\WSUS\Scripts\
wsus_log_folder
: Sets the folder for logging WSUS related items. Default isC:\WSUS\Logs
wsus_products_list
: A list of products which updates will be downloaded for. Default items areWindows Server 2016
andWindows Server 2019
wsus_classifications_list
: A list of the Update Classifications that will be enabled. Default items areCritical Updates
andSecurity Updates
wsus_use_proxy
: Used to determine if proxy for WSUS Server will be configured. Default isno
, only applies ifwsus_port
andwsus_proxy
are defined.wsus_facts
: Determines whether WSUS facts should be returnedwsus_enable_default_approval_rule
: Enable or disable the default approval rule in WSUSwsus_languages
: A list of languages for which updates will be downloaded by WSUS. Default is justen
(English)-
Set the time of day when WSUS will run an automatic synchronization. Use
wsus_sync_daily_time: hour: 0 minute: 0
hour: 0
for midnight.
There are no known dependencies.
An example playbook for using this role:
---
- hosts: all
vars:
ansible_user: 'administrator'
ansible_become_user: System
ansible_become_method: runas
ansible_shell_type: powershell
ansible_host_key_checking: False
ansible_ssh_common_args: '-C -o ControlMaster=auto -o ControlPersi
st=180s -o StrictHostKeyChecking=no -o UserKnownHostsFile=/ dev/null'
wait_for_sync: True
roles:
- wsus
MIT