Sha256: 9cdfaadb6e4f101cbc4e9358f9ac3b3d32e02694c3994a775506c2f471f076ee
Contents?: true
Size: 949 Bytes
Versions: 110
Compression:
Stored size: 949 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 case @resource["withpath"] when :true send(@resource[:loglevel], self.should) else Puppet.send(@resource[:loglevel], self.should) 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. Defaults to false." 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
110 entries across 110 versions & 2 rubygems