Hi everyone, I have been porting my puppet management module to puppet 4 and have run across what seems to be a bug but I am not completely sure. My module manages the hiera.yaml file so I need to be able to setup my hierarchy from a hiera variable When this code was running under puppet 3.x i could put this in hiera and it worked. The %%{}{::data_centre} got put in as a %{::data_centre} and everything was awesome. puppet::profile::master::hiera_hierarchy: - "defaults" - "node/%%{}{::data_centre}/%%{}{::clientcert}" - "node/%%{}{::data_centre}/%%{}{::hostname}" - "node/%%{}{::clientcert}" - "node/%%{}{::hostname}" - "data_centre/%%{}{::data_centre}" - "OS/%%{}{::operatingsystem}/%%{}{::operatingsystemmajrelease}" - "env/%%{}{::environment}" - "global"
sadly %%{} stopped working in hiera 2 but there is supposed to be a literal function that does the same thing so this should actually work with hiera 2 puppet::profile::master::hiera_hierarchy: - "defaults" - "node/%{literal('%')}{::data_centre}/%{literal('%')}{::clientcert}" - "node/%{literal('%')}{::data_centre}/%{literal('%')}{::hostname}" - "node/%{literal('%')}{::clientcert}" - "node/%{literal('%')}{::hostname}" - "data_centre/%{literal('%')}{::data_centre}" - "OS/%{literal('%')}{::operatingsystem}/%{literal('%')}{::operatingsystemmajrelease}" - "env/%{literal('%')}{::environment}" - "global" sadly it doesn't and gives me this error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Error from DataBinding 'hiera' while looking up 'puppet::profile::master::hiera_hierarchy': Detected in [literal('%')] at /vagrant/r10k/upstream/development/manifests/site.pp:1:1 on node puppet.abstractit.com.au and puts this in my hiera.yaml file instead. - "node/%#<Hiera::Scope:0x19fcb05f>{::data_centre}/%#<Hiera::Scope:0x19fcb05f>{::clientcert}" Has anyone else seen this sort of behaviour? -- Pete Brown Director and Primary Infrastructure Developer Abstract IT Pty Ltd. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAM8R_x9a%3D6XqK8r-osTBVmnFw%2BTtOQ9C038mXOsjaeGqChOjAQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.