Hi Rudy,

I don’t know whether someone already replied.
https://docs.puppet.com/puppet/4.10/hiera_migrate_v3_yaml.html#remove-hierarchy-levels-with-callingmodule-and-friends

Quote from the link:

Remove hierarchy levels with calling_module and friends

Hiera 3 could use three special pseudo-variables (which weren’t available in 
Puppet code) in its hierarchy:

        • calling_module
        • calling_class
        • calling_class_path
Hiera.yaml version 5 doesn’t support these, so you must drop any hierarchy 
levels that interpolate them.

These variables were added to support a hacky predecessor of module data; 
anything you were doing with them is better accomplished with the module layer.

Martin

> On 16 May 2017, at 11:36, Rudy Gevaert <rudy.geva...@gmail.com> wrote:
> 
> And to add the current hiera.yaml (3)
> 
> # Managed with Puppet
> ---
> :backends:
>   - eyaml
>   - yaml
> :yaml:
>   :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
> :eyaml:
>   :extension: 'yaml'
>   :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
>   :pkcs7_private_key: /etc/puppetlabs/eyaml/private_key.pkcs7.pem
>   :pkcs7_public_key:  /etc/puppetlabs/eyaml/public_key.pkcs7.pem
> :hierarchy:
>   - "nodes/%{::trusted.certname}"
>   - "application_tier/%{::application_tier}/%{calling_class}"
>   - "application_tier/%{::application_tier}/%{calling_module}"
>   - "application_tier/%{::application_tier}"
>   - "classes/%{calling_class}"
>   - "modules/%{calling_module}"
>   - "environment/%{::environment}"
>   - "serverbeheer"
>   - "common"
> 
> 
> 
> On Tuesday, May 16, 2017 at 11:31:23 AM UTC+2, Rudy Gevaert wrote:
> Hallo,
> 
> Now that I have upgraded to the latest Puppet version I have the task to 
> upgrade our hiera setup.
> 
> Unfortunately we are heavily using calling_class and calling_module in our 
> setup.  And although the documentation says currently hiera5 is backward 
> compatible.  This doesn't work anymore.
> 
> I would like to know how I can easily upgrade to hiera5 without needing to 
> change all the lookups at once.
> 
> Is there any way to do that?  Or shall I need to do this all at once?
> 
> For now it seems impossible to have a situation that I can work in a branch 
> to test things about.  Because to change to Hiera5, (and so being able to 
> test the new system) I immediately remove my ability to leave calling_* in 
> the global hiera config.
> 
> Thanks in advance,
> 
> Rudy
> 
> 
> -- 
> 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/a2fc367f-b591-49fa-b810-a0af926a0d7c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/46C84447-12E9-4229-93E9-0F3992D2DD62%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to