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 details of default values and whatnot as well.


Rob Nelson
rnels...@gmail.com

On Mon, Jul 18, 2016 at 2:54 PM, Tobias Köck <tobias.ko...@gmail.com> wrote:

> 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 automatically access the
>
> qmonitoring::db::icinga2_ido_password
>
> Hiera variable.
>
> With $icinga2_ido_password it doesn't work with hiera( ...) it works.
>
> How can I automatically access the Hiera variable in my class with the
> priority lookup without having to use hiera(...)?
>
> Greetings and thanks,
> Tobias
>
>
>
> --
> 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/486eacc6-36c2-da49-c958-def735f2f6cb%40gmail.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/CAC76iT9F_UG4B-Xfaj-YHK1Z8dzDFf5oZVXawgs_TpM%2BV%2BeaqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to