Hi that worked. Thanks.
So if I want to force the user to set the variables in Hiera I have to use the hiera( .. ) function? Greetings Tobias On Mon, Jul 18, 2016 at 9:11 PM, Robert Story <rst...@tislabs.com> wrote: > On Mon, 18 Jul 2016 20:54:43 +0200 Tobias wrote: > TK> for testing Hiera a have written a common.yaml with > TK> > TK> qmonitoring::db::icinga2_ido_password: "mypwd34" > TK> qmonitoring::db::icinga2_webdb_password: "mypwd544" > TK> > TK> and I have a module named qmonitoring with a class named > TK> > TK> class qmonitoring::db { > TK> > TK> $new_var = $icinga2_ido_password, > TK> > TK> } > TK> [...] > TK> With $icinga2_ido_password it doesn't work with hiera( ...) it works. > TK> > TK> How can I automatically access the Hiera variable in my class with the > TK> priority lookup without having to use hiera(...)? > > Try making it a parameter: > > class qmonitoring::db ( $icinga2_ido_password = 'default' ) { > ... > > > Robert > > -- > Senior Software Engineer @ Parsons > -- 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/CANxXLRZxjYi8CKOgmi5TT%2BF4ZypO813LmROgApKfuPOAkOo%3Dig%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.