Sha256: 2f2a4b18746d9bec3c51a12429496271d4ff0013a6a8e936f8467443bf5c477c

Contents?: true

Size: 930 Bytes

Versions: 105

Compression:

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

    apply_to_all

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

105 entries across 105 versions & 2 rubygems

Version Path
puppet-5.5.17-x86-mingw32 lib/puppet/type/notify.rb
puppet-5.5.17 lib/puppet/type/notify.rb
puppet-5.5.17-x64-mingw32 lib/puppet/type/notify.rb
puppet-5.5.17-universal-darwin lib/puppet/type/notify.rb
puppet-6.4.4 lib/puppet/type/notify.rb
puppet-6.4.4-x86-mingw32 lib/puppet/type/notify.rb
puppet-6.4.4-x64-mingw32 lib/puppet/type/notify.rb
puppet-6.4.4-universal-darwin lib/puppet/type/notify.rb
puppet-6.4.3 lib/puppet/type/notify.rb
puppet-6.4.3-x86-mingw32 lib/puppet/type/notify.rb
puppet-6.4.3-x64-mingw32 lib/puppet/type/notify.rb
puppet-6.4.3-universal-darwin lib/puppet/type/notify.rb
puppet-6.0.10 lib/puppet/type/notify.rb
puppet-6.0.10-x86-mingw32 lib/puppet/type/notify.rb
puppet-6.0.10-x64-mingw32 lib/puppet/type/notify.rb
puppet-6.0.10-universal-darwin lib/puppet/type/notify.rb
puppet-5.5.16 lib/puppet/type/notify.rb
puppet-5.5.16-x86-mingw32 lib/puppet/type/notify.rb
puppet-5.5.16-x64-mingw32 lib/puppet/type/notify.rb
puppet-5.5.16-universal-darwin lib/puppet/type/notify.rb