diff options
author | ajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-29 22:08:40 +0000 |
---|---|---|
committer | ajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-29 22:08:40 +0000 |
commit | 5da80dbbfe93d542834bd4672f1af8ebd337877b (patch) | |
tree | 7a41883fe645dd4c813eede1cbd274ae0dcb3361 /lib/puppet | |
parent | f53b9b05dbc596f4baa4bff3760b10df9f5fb59f (diff) | |
download | puppet-5da80dbbfe93d542834bd4672f1af8ebd337877b.tar.gz puppet-5da80dbbfe93d542834bd4672f1af8ebd337877b.tar.xz puppet-5da80dbbfe93d542834bd4672f1af8ebd337877b.zip |
- New type Notify for sending client-side log messages
type.rb
type/notify.rb
- Added server-side functions named after each of the syslog log levels (debug, info, notice, warning, err, crit, alert, and emerg)
parser/functions.rb
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1708 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type.rb | 1 | ||||
-rw-r--r-- | lib/puppet/type/notify.rb | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 13caf1973..320aa83a0 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -2673,5 +2673,6 @@ require 'puppet/type/symlink' require 'puppet/type/user' require 'puppet/type/tidy' require 'puppet/type/parsedtype' +require 'puppet/type/notify' # $Id$ diff --git a/lib/puppet/type/notify.rb b/lib/puppet/type/notify.rb new file mode 100644 index 000000000..8f00d5eb5 --- /dev/null +++ b/lib/puppet/type/notify.rb @@ -0,0 +1,37 @@ +# +# Simple module for logging messages on the client-side +# + +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) + return + end + + def retrieve + return + end + + def insync? + false + end + + end + + newparam(:name) do + desc "An arbitrary reference tag; the name of the message." + isnamevar + end + + end +end + +# $Id:$
\ No newline at end of file |