Guest User

Untitled

a guest
May 25th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. ## function
  2.  
  3. module Puppet::Parser::Functions
  4. newfunction(:lookupvar, :type => :rvalue) do |args|
  5. if lookupvar(args[0]) {
  6. return lookupvar(args[0])
  7. } else {
  8. return undef
  9. }
  10. end
  11. end
  12.  
  13. ## output
  14.  
  15. root@pinocchio:~# puppetd -vt --noop
  16. info: Loading fact localuidgid
  17. info: Retrieving facts
  18. info: Loading fact localuidgid
  19. 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 ';'
  20. /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:5: syntax error, unexpected '}', expecting kEND
  21. } else {
  22. ^
  23. /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:6: void value expression
  24. /usr/lib/ruby/1.8/puppet/parser/functions/lookupvar.rb:6: odd number list for Hash in method puppetmaster.getconfig
  25. warning: Not using cache on failed catalog
Add Comment
Please, Sign In to add comment