Skip to content

Instantly share code, notes, and snippets.

@joeypiccola
Created January 16, 2020 18:48
Show Gist options
  • Save joeypiccola/fddb18f3e508dd0ec9092a7e0a669af2 to your computer and use it in GitHub Desktop.
Save joeypiccola/fddb18f3e508dd0ec9092a7e0a669af2 to your computer and use it in GitHub Desktop.
moving puppet event logs on windows from the app event log to a dedicated puppet event log
# move puppet windows events out of the Application log into a new log named Puppet
if $facts['os']['family'] == 'windows' {
registry_key { 'Application_Puppet':
ensure => absent,
path => 'HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Puppet',
}
registry_key { 'Puppet_Puppet':
ensure => present,
path => 'HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Puppet\Puppet',
require => Registry_key['Application_Puppet'],
}
registry_value { 'EventMessageFile':
ensure => present,
path => 'HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Puppet\Puppet\EventMessageFile',
type => string,
data => 'C:\Program Files\Puppet Labs\Puppet\puppet\bin\puppetres.dll',
require => Registry_key['Puppet_Puppet'],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment