Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## function
- module Puppet::Parser::Functions
- newfunction(:lookupvar, :type => :rvalue) do |args|
- if lookupvar(args[0]) {
- return lookupvar(args[0])
- } else {
- return undef
- }
- end
- end
- ## output
- root@pinocchio:~# puppetd -vt --noop
- info: Loading fact localuidgid
- info: Retrieving facts
- info: Loading fact localuidgid
- err: Could not retrieve catalog: Uncaught exception /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:3: syntax error, unexpected '{', expecting kTHEN or ':' or '\n' or ';'
- /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:5: syntax error, unexpected '}', expecting kEND
- } else {
- ^
- /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:6: void value expression
- /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:6: odd number list for Hash in method puppetmaster.getconfig
- warning: Not using cache on failed catalog
Add Comment
Please, Sign In to add comment