summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/type/notify.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/puppet/type/notify.rb b/lib/puppet/type/notify.rb
index 8f00d5eb5..542b5f0b4 100644
--- a/lib/puppet/type/notify.rb
+++ b/lib/puppet/type/notify.rb
@@ -6,13 +6,15 @@ module Puppet
newtype(:notify) do
@doc = "Sends an arbitrary message to the puppetd run-time log."
- #
- # This state
- #
newstate(:message) do
desc "The message to be sent to the log."
def sync
- Puppet::info(self.should)
+ case @parent["withpath"]
+ when :true:
+ log(self.should)
+ else
+ Puppet::info(self.should)
+ end
return
end
@@ -26,11 +28,18 @@ module Puppet
end
+ newparam(:withpath) do
+ desc "Whether to not to show the full object path. If true, the message
+ will be sent to the client at the current loglevel. If false,
+ the message will be sent to the client at the info level."
+ defaultto :true
+ newvalues(:true, :false)
+ end
+
newparam(:name) do
- desc "An arbitrary reference tag; the name of the message."
+ desc "An arbitrary tag for your own reference; the name of the message."
isnamevar
end
-
end
end