Sha256: 858e026d5f982636ad2f4753dd5b4dd554d0fc3af5d73de9c677462e33969d89

Contents?: true

Size: 1.06 KB

Versions: 10

Compression:

Stored size: 1.06 KB

Contents

#
# 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."

        newproperty(:message) 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
                return
            end

            def insync?(is)
                false
            end

            defaultto { @resource[:name] }
        end

        newparam(:withpath) do 
            desc "Whether to not 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

10 entries across 10 versions & 1 rubygems

Version Path
puppet-0.24.9 lib/puppet/type/notify.rb
puppet-0.24.0 lib/puppet/type/notify.rb
puppet-0.24.1 lib/puppet/type/notify.rb
puppet-0.24.4 lib/puppet/type/notify.rb
puppet-0.24.3 lib/puppet/type/notify.rb
puppet-0.24.2 lib/puppet/type/notify.rb
puppet-0.24.7 lib/puppet/type/notify.rb
puppet-0.24.5 lib/puppet/type/notify.rb
puppet-0.24.6 lib/puppet/type/notify.rb
puppet-0.24.8 lib/puppet/type/notify.rb