|
So for the time being, we've decided to not pursue this particular effort as written, by adding a configurable event log destination.
Instead, as part of
PUP-5756
, Puppet was changed so that should a Puppet event log destination exist, Puppet will automatically log there. There are some more details in the PR at https://github.com/puppetlabs/puppet/pull/5509/files#r135102712 about the technical details of how that works, but the important thing is that users of Puppet 5.0.0 and above may opt-in to this change in behavior by simply registering the event log destination.
There are a few ways this can be done:
-
By directly creating the registry keys like:
reg add HKLM\System\CurrentControlSet\Services\EventLog\Puppet\Puppet /v EventMessageFile /t REG_EXPAND_SZ /d "C:\Program Files\Puppet Labs\Puppet\bin\puppetres.dll"
|
-
By using the PowerShell helper:
New-EventLog -Source Puppet -LogName Puppet -MessageResource "C:\Program Files\Puppet Labs\Puppet\bin\puppetres.dll"
|
-
By pushing out the reg keys via GPO (can be done prior to bootstrapping the agent install or after the agent has installed)
-
By using Puppet resources - a cmd based exec that runs reg.exe OR a PowerShell exec that runs New-EventLog OR registry resources (from the registry module)
This allows us to enable the feature without making any additional code changes to Puppet which is the ideal solution for now.
Note that PUP-7914 was added for the Puppet 5.2.0 release to make sure a release note appears, so users know to look at updated documentation.
|