Add auditing hooks for puppet apply
--- puppet-3.6.2/lib/puppet/application/apply.rb.orig 2014-06-09 15:08:19.000000000 -0600
+++ puppet-3.6.2/lib/puppet/application/apply.rb 2014-06-25 14:57:54.627534169 -0600
@@ -1,5 +1,8 @@
require 'puppet/application'
require 'puppet/configurer'
+if Facter.value(:osfamily) == "Solaris"
+ require 'PuppetAudit'
+end
class Puppet::Application::Apply < Puppet::Application
@@ -209,6 +212,12 @@
end
begin
+ # configure auditing on Solaris
+ if Facter.value(:osfamily) == "Solaris"
+ audit_handle = PuppetAudit.new
+ end
+
# Compile our catalog
starttime = Time.now
catalog = Puppet::Resource::Catalog.indirection.find(node.name, :use_node => node)
@@ -237,6 +246,12 @@
rescue => detail
Puppet.log_exception(detail)
exit(1)
+ ensure
+ # clean up auditing records on Solaris
+ if Facter.value(:osfamily) == "Solaris"
+ end
end
end
end