Hi Henrik,

something from your previous answer made me think and I've been playing a
little bit with what you said:


>> class cb_sync(
>>    Hash $cb_sync = lookup(cb_data_sync),
>>
> The lookup here has no effect - it will use APL to do exactly what the
> default expression is doing - thus, it will never be called.
>

without the lookup the APL will look in hiera for the variable
cb_sync::cb_sync: (https://puppet.com/docs/puppet/5.2/hiera_automatic.html)

   1. *Puppet automatically looks up the remaining parameters with Hiera,
   using <CLASS NAME>::<PARAMETER NAME> as the lookup key (for
   example, ntp::servers for the ntp class’s $servers parameter).*


But, if I want the class to look for a top scope variable (like what I was
doing in my class), then the lookup is needed.
without lookup it does not work, that's why you afirmation : "the lookup
here has no effect" made my think.

TIA,
Arnau

-- 
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/CAM69jx9-oi2grQ9W3OK-2Oi2V5NOi6ek4%2B4n4SZgAR3U%3DmAYPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to