[Puppet Users] hierarchy inside a module

2016-07-18 Thread Alex Samad
Hi presume i have in my hiera.yaml something like this :hierarchy: - env/%{::ybenv} lets presume that env is not set in my ENC. but lets say in a module that is included by my hiera_include(classes) in my manifests/sites.pp I have this $::env=Test and then I do a hiera

Re: [Puppet Users] Puppet module and Hiera variable access

2016-07-18 Thread Ramin K
You can use parameters as Rob suggests or specify the lookup yourself. $new_var = hiera('icinga2_ido_password') Also the var will be $::qmonitoring::db::new_var not the key you used. I recommend matching var to lookup key to make it easier to trace through the code. $icinga2_ido_password =

Re: [Puppet Users] Puppet module and Hiera variable access

2016-07-18 Thread Rob Nelson
You should investigate hiera automatic parameter lookup ( https://docs.puppet.com/hiera/latest/puppet.html#automatic-parameter-lookup). You need to make `icinga2_ido_password` a parameter of your class and then APL will "magically" populate that properly. Check out the article, which gets into

[Puppet Users] Puppet module and Hiera variable access

2016-07-18 Thread Tobias Köck
Hi, for testing Hiera a have written a common.yaml with qmonitoring::db::icinga2_ido_password: "mypwd34" qmonitoring::db::icinga2_webdb_password: "mypwd544" and I have a module named qmonitoring with a class named class qmonitoring::db { $new_var = $icinga2_ido_password, } where I try to