Update windows_baseline.pp
This commit is contained in:
parent
6d7444eb02
commit
a7eef3e9f7
@ -44,5 +44,50 @@ class profile::windows_baseline {
|
|||||||
type => dword,
|
type => dword,
|
||||||
data => '0xFFFFFFFF',
|
data => '0xFFFFFFFF',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if versioncmp($::powershell_version, '5.1.0') <= 0 {
|
||||||
|
#notify{"version was less than":}
|
||||||
|
|
||||||
|
# service needs to be running to install the update
|
||||||
|
service { 'wuauserv':
|
||||||
|
ensure => 'running',
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
# disable auto updating so machine doesnt start downloading / updating
|
||||||
|
registry::value { 'disable updates':
|
||||||
|
key => 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU',
|
||||||
|
value => 'NoAutoUpdate',
|
||||||
|
data => '1',
|
||||||
|
type => 'dword',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get WMF
|
||||||
|
package { 'powershell':
|
||||||
|
ensure => latest,
|
||||||
|
#install_options => ['-pre','--ignore-package-exit-codes'],
|
||||||
|
provider => chocolatey,
|
||||||
|
}
|
||||||
|
|
||||||
|
reboot {'dsc_install':
|
||||||
|
subscribe => Package['powershell'],
|
||||||
|
apply => 'immediately',
|
||||||
|
timeout => 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
registry::value { 'enable insecure winrm':
|
||||||
|
key => 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service',
|
||||||
|
value => 'AllowUnencryptedTraffic',
|
||||||
|
data => '1',
|
||||||
|
type => 'dword',
|
||||||
|
notify => Service['WinRM'],
|
||||||
|
}
|
||||||
|
|
||||||
|
service {'WinRM':
|
||||||
|
ensure => 'running',
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user