> Hi, > > 2012/11/23 Evelio VILA <eveli...@gmail.com <javascript:>> > >> Hi guys, >> >> i have a hiera.yaml config file like this: >> >> --- >> :hierarchy: >> - %{env}/%{tmp_module_name} >> - %{env}/%{tmp_module_name}.common >> :backends: >> - yaml >> :yaml: >> :datadir: '/etc/puppet/hieradata' >> >> >> I also have a test/some_module.yaml file like this: >> >> --- >> db: >> root : pass >> port : '3306' >> >> >> I am also using the hiera function from a template like this >> >> class.pp >> $::class::var='db' >> >> template.erb >> <%= scope.function_hiera([var]) %> > > > Try this: <%= scope.function_hiera([var['root']]) %> >
Thanks Dominik but that wont work neither, already tried that :( on the agent: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template module/template.erb: Filepath: /usr/lib/ruby/vendor_ruby/hiera_puppet.rb Line: 16 Detail: Could not find data item in any Hiera data file and no default supplied at /etc/puppet/modules/module/manifests/create_data.pp:8 on node X warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run on the master: hiera(): Looking up in YAML backend : hiera(): Looking for data source env/module : hiera(): Looking for data source env/module.common : hiera(): Looking for data source module.common : hiera(): Looking for data source common : Failed to parse template module/template.erb: : Filepath: /usr/lib/ruby/vendor_ruby/hiera_puppet.rb : Line: 16 : Detail: Could not find data item in any Hiera data file and no default supplied : at /etc/puppet/modules/module/manifests/create_data.pp:8 on node X : Failed to parse template module/template.erb: : Filepath: /usr/lib/ruby/vendor_ruby/hiera_puppet.rb : Line: 16 : Detail: Could not find data item in any Hiera data file and no default supplied : at /etc/puppet/modules/module/manifests/create_data.pp:8 on node X : Failed to parse template module/template.erb: : Filepath: /usr/lib/ruby/vendor_ruby/hiera_puppet.rb : Line: 16 : Detail: Could not find data item in any Hiera data file and no default supplied : at /etc/puppet/modules/module/manifests/create_data.pp:8 on node X : Handling request: PUT /production/report/X here is my func: <%= scope.function_hiera([cluster['port']]) %> yaml file: --- cluster: root : pass port : '9938' thanks in advance.. evelio -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/bzHviZ2FGQIJ. 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.