Sha256: c1a170a59a7e3ff9c79518ea710f64671ac1e8441b7b5e7a7693f4a82506d24d

Contents?: true

Size: 904 Bytes

Versions: 96

Compression:

Stored size: 904 Bytes

Contents

#
# Simple module for logging messages on the client-side


module Puppet
  newtype(:notify) do
    @doc = "Sends an arbitrary message to the agent 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
        :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 & 3 rubygems

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-3.8.7 lib/puppet/type/notify.rb
puppet-3.8.7-x86-mingw32 lib/puppet/type/notify.rb
puppet-3.8.7-x64-mingw32 lib/puppet/type/notify.rb
puppet-3.8.6 lib/puppet/type/notify.rb
puppet-3.8.6-x86-mingw32 lib/puppet/type/notify.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-3.8.6-x64-mingw32 lib/puppet/type/notify.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-3.8.5 lib/puppet/type/notify.rb
puppet-3.8.5-x86-mingw32 lib/puppet/type/notify.rb
puppet-3.8.5-x64-mingw32 lib/puppet/type/notify.rb
puppet-3.8.4 lib/puppet/type/notify.rb
puppet-3.8.4-x86-mingw32 lib/puppet/type/notify.rb
puppet-3.8.4-x64-mingw32 lib/puppet/type/notify.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/type/notify.rb