Can't get the extlookup() that supports yaml to work.

I did this...

On server:
mv /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb.orig
Replaced /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
with puppet-extlookup/lib/puppet/parser/functions/extlookup.rb
mkdir /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup/
Added puppet-extlookup/lib/puppet/util/extlookup.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util
Added puppet-extlookup/lib/puppet/util/extlookup/csv_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
Added puppet-extlookup/lib/puppet/util/extlookup/yaml_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
Added puppet-extlookup/lib/puppet/util/extlookup/puppet_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup

Created /etc/puppet/extlookup.yaml:
---
:parser: YAML
:precedence:
- environment_%{environment}
- common
:yaml:
  :datadir: /etc/puppet/extdata

Created /etc/puppet/extdata/settings.yaml:
---
testkey: testval

Calling with:
        $test_var = extlookup('testkey', '---', 'settings.yaml')
        notice("TEST VAR=$test_var")

And $test_var is always '---'. Replacing settings.yaml with a bogus file
name also returns '---', which tells me that the file isn't being found.
What am I missing here? Quite possibly a lot given the really bad docs.

What is 'precedence' for? Not documented.

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to