It started in puppet 4, I believe 4.3. The lookup options go anywhere in your hiera data, common.yaml or somewhere more specific. It will merge, so you can add the ntp::servers key in common and sql2014::install_options in a fqdn/role type tier if need be.
On Wednesday, January 27, 2016, Corey Osman <[email protected]> wrote: > 1. Can this be done in PE 3.8? > 2. Its not clear where the lookup_options need to go. Does the > lookup_options go in hiera.yaml? > > > https://docs.puppetlabs.com/puppet/latest/reference/lookup_quick.html#setting-lookupoptions-in-data > > lookup_options: ntp::servers: merge: native? (I don't need deep merge) > > Very cool stuff, I did not know about this. But this would be exactly > what I want. > > > Corey > > On Wednesday, January 27, 2016 at 10:37:31 AM UTC-8, Rob Nelson wrote: > >> Corey, take a look at the lookup_options to specify merge behavior with >> APL. Prior to this, APL would not do hash lookups with any merge behavior. >> This should change that: >> https://docs.puppetlabs.com/puppet/latest/reference/lookup_quick.html#specifying-merge-behavior >> and >> https://docs.puppetlabs.com/puppet/latest/reference/function.html#merge-behaviors >> for the valid options. >> >> >> Rob Nelson >> [email protected] >> >> On Wed, Jan 27, 2016 at 1:07 PM, Corey Osman <[email protected]> >> wrote: >> >>> I have the following code which uses the auto binding feature to lookup >>> a hiera value. This is nothing new though. The problem I see is that there >>> is no way to tell puppet to use hiera_hash() for the install_options. >>> >>> class sql2014( >>> Hash $install_options = {}, >>> String $instance_name = 'MSSQLSERVER', >>> Hash $ssdt_install_options = {} >>> ) >>> >>> Now I could alternatively specify hiera_hash but then I create a race >>> condition unless I change the key name: >>> >>> class sql2014( >>> Hash $install_options = >>> hiera_hash(’sql2014::install_options’, {}), >>> String $instance_name = 'MSSQLSERVER', >>> Hash $ssdt_install_options = {} >>> ) >>> >>> Please tell me that when using puppet 4 data types, puppet will >>> automatically switch hiera methods based on type to use the hiera hash / >>> array binding method instead of the normal hiera method. >>> >>> If not, is this even possible? >>> >>> >>> Corey >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Puppet Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/puppet-dev/2C87F17D-1E11-4CD7-A65B-8F4B4EB2E90E%40nwops.io >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','puppet-dev%[email protected]');> > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/606d031e-cf26-4dfc-aba3-70b85c14bd54%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-dev/606d031e-cf26-4dfc-aba3-70b85c14bd54%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Rob Nelson [email protected] -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAC76iT-1j7yqsOMd2W%2BZYC1R6y2%3D%2BPCYD9qPE%2B3DZ0OtuQ9iPQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
