Puppet Class: advanced_security_policy
- Defined in:
- manifests/init.pp
Overview
class advanced_security_policy
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'manifests/init.pp', line 2
class advanced_security_policy {
file { 'C:/Management/advanced_security':
ensure => 'directory',
}
exec { 'backup registry.pol':
command => 'powershell Copy-Item C:/Windows/System32/GroupPolicy/Machine/Registry.pol C:/Management/advanced_security/Registry.pol',
path => 'C:/Windows/System32/WindowsPowerShell/v1.0',
creates => 'C:/Management/advanced_security/Registry.pol',
# onlyif => 'powershell Test-Path C:/Windows/System32/GroupPolicy/Machine/Registry.pol',
}
file { 'C:/Windows/System32/LGPO.exe':
ensure => file,
source => 'puppet:/modules/advanced_security_policy/LGPO.exe',
}
if $facts['domainrole'] == 'Standalone Server' {
scheduled_task { 'gpupdate (managed by puppet)':
ensure => present,
enabled => true,
command => 'C:/Windows/system32/gpupdate.exe',
trigger => {
schedule => daily,
start_time => '00:30',
minutes_interval => 30,
},
user => 'SYSTEM',
}
}
}
|