Sha256: 997c3630b08cf40f40892607e7255232813435867993e838cb1333d84573ac85

Contents?: true

Size: 931 Bytes

Versions: 96

Compression:

Stored size: 931 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."

    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

96 entries across 96 versions & 2 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/type/notify.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/type/notify.rb
puppet-4.10.12 lib/puppet/type/notify.rb
puppet-4.10.12-x86-mingw32 lib/puppet/type/notify.rb
puppet-4.10.12-x64-mingw32 lib/puppet/type/notify.rb
puppet-4.10.12-universal-darwin lib/puppet/type/notify.rb
puppet-4.10.11 lib/puppet/type/notify.rb
puppet-4.10.11-x86-mingw32 lib/puppet/type/notify.rb
puppet-4.10.11-x64-mingw32 lib/puppet/type/notify.rb
puppet-4.10.11-universal-darwin lib/puppet/type/notify.rb
puppet-4.10.10 lib/puppet/type/notify.rb
puppet-4.10.10-x86-mingw32 lib/puppet/type/notify.rb
puppet-4.10.10-x64-mingw32 lib/puppet/type/notify.rb
puppet-4.10.10-universal-darwin lib/puppet/type/notify.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/type/notify.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/type/notify.rb
puppet-4.10.9 lib/puppet/type/notify.rb
puppet-4.10.9-x86-mingw32 lib/puppet/type/notify.rb
puppet-4.10.9-x64-mingw32 lib/puppet/type/notify.rb
puppet-4.10.9-universal-darwin lib/puppet/type/notify.rb