diff options
-rw-r--r-- | lib/puppet/type/notify.rb | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/lib/puppet/type/notify.rb b/lib/puppet/type/notify.rb index a51397d48..8877e3398 100644 --- a/lib/puppet/type/notify.rb +++ b/lib/puppet/type/notify.rb @@ -4,41 +4,43 @@ module Puppet newtype(:notify) do - @doc = "Sends an arbitrary message to the puppetd run-time log." - - newproperty(:message) do - desc "The message to be sent to the log." - def sync - case @parent["withpath"] - when :true: - log(self.should) - else - Puppet.send(@parent[:loglevel], self.should) + @doc = "Sends an arbitrary message to the puppetd run-time log." + + newproperty(:message) do + desc "The message to be sent to the log." + def sync + case @parent["withpath"] + when :true: + log(self.should) + else + Puppet.send(@parent[:loglevel], self.should) + end + return end - return - end - def retrieve - return - end + def retrieve + return + end + + def insync? + false + end - def insync? - false + defaultto { @parent[:name] } end - end - newparam(:withpath) do - desc "Whether to not to show the full object path. Sends the - message at the current loglevel." - defaultto :true + newparam(:withpath) do + desc "Whether to not to show the full object path. Sends the + message at the current loglevel." + defaultto :false - newvalues(:true, :false) - end + newvalues(:true, :false) + end - newparam(:name) do - desc "An arbitrary tag for your own reference; the name of the message." - isnamevar - end + newparam(:name) do + desc "An arbitrary tag for your own reference; the name of the message." + isnamevar + end end end |