Sha256: eb3d95009f448307a07559053ec888f0906186343773ef6d21c119ce977f909d
Contents?: true
Size: 996 Bytes
Versions: 24
Compression:
Stored size: 996 Bytes
Contents
# # Simple module for logging messages on the client-side module Puppet Type.newtype(:notify) do @doc = "Sends an arbitrary message to the agent run-time log." apply_to_all newproperty(:message, :idempotent => false) do desc "The message to be sent to the log." def sync message = @sensitive ? 'Sensitive [value redacted]' : self.should case @resource["withpath"] when :true send(@resource[:loglevel], message) else Puppet.send(@resource[:loglevel], message) end return end def retrieve :absent end def insync?(is) false end defaultto { @resource[:name] } end newparam(:withpath) do desc "Whether to show the full object path." defaultto :false newvalues(:true, :false) end newparam(:name) do desc "An arbitrary tag for your own reference; the name of the message." isnamevar end end end
Version data entries
24 entries across 24 versions & 1 rubygems