Skip to content

Commit 4a59a1f

Browse files
committed
Issue 198 - Disable Dual Scan
Add parameter disable_dual_scan (default undef) to be able to not allow update deferral policies to cause scans against Windows Update when using WSUS server
1 parent 137be7b commit 4a59a1f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

manifests/init.pp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@
136136
# This enabled parameter is only respected when the WSUS server allows clients to modify this setting via the TargetGroup and
137137
# TargetGroupEnabled registry keys.
138138
#
139+
# @param disable_dual_scan
140+
# Enable this policy to not allow update deferral policies to cause scans against Windows Update.
141+
# Valid options: 'true', 'false', and undef. Default: undef.
142+
#
139143
class wsus_client (
140144
Optional[Variant[Stdlib::HTTPUrl,Boolean]] $server_url = undef,
141145
Optional[Boolean] $enable_status_server = undef,
@@ -157,6 +161,7 @@
157161
Optional[Variant[Integer[15,180],Boolean]] $always_auto_reboot_at_scheduled_time_minutes = undef,
158162
Boolean $purge_values = false,
159163
Optional[Variant[String,Boolean]] $target_group = undef,
164+
Optional[Boolean] $disable_dual_scan = undef,
160165
) {
161166
$_basekey = 'HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate'
162167

@@ -244,6 +249,12 @@
244249
validate_bool => true,
245250
}
246251

252+
wsus_client::setting { "${_basekey}\\DisableDualScan":
253+
data => $disable_dual_scan,
254+
has_enabled => false,
255+
validate_bool => true,
256+
}
257+
247258
wsus_client::setting { "${_basekey}\\ElevateNonAdmins":
248259
data => $elevate_non_admins,
249260
has_enabled => false,

spec/acceptance/wsus_client_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,4 +314,10 @@ def create_apply_manifest(params, clear_first = true)
314314
end
315315
end
316316
end
317+
318+
context 'with disable_dual_scan =>', testrail: ['70270', '70271'] do
319+
it_behaves_like 'boolean values',
320+
:disable_dual_scan,
321+
'DisableDualScan'
322+
end
317323
end

0 commit comments

Comments
 (0)