Skip to content

Instantly share code, notes, and snippets.

@quadriq
Last active April 8, 2016 07:24
Show Gist options
  • Save quadriq/2834710c0e012374f9f4ae628971ab99 to your computer and use it in GitHub Desktop.
Save quadriq/2834710c0e012374f9f4ae628971ab99 to your computer and use it in GitHub Desktop.
require 'logger'
module Puppet::Parser::Functions
newfunction(:homer, :type => :rvalue) do |args|
log = Logger.new(STDOUT)
log.level = Logger::INFO
log.info("this going into logs on SERVER: #{args[0]}")
raise(Puppet::ParseError, "this raise an error on CLIENT by 'puppet agent -t' : #{args[0]}")
"some string return"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment