On 30/04/18 15:18, jcbollinger wrote:


On Saturday, April 28, 2018 at 7:29:29 AM UTC-5, Henrik Lindberg wrote:

    On 28/04/18 13:21, du wrote:
     > Thanks all for the responses
     >
     > I realise that the global option is no longer there and I am
    trying to
     > set v5 up so that I can get the similar behaviour.
     >
     > On Friday, April 27, 2018 at 6:12:32 PM UTC+1, Henrik Lindberg
    wrote:
     >
     >     Depends on what you mean. The 'deep' in hiera 5 is the same
    as 'deeper'
     >     in hiera 3. It just works.
     >
     > Yes, it works absolutely fine if I specify hash name explicitly in
     > lookup_options - my issue is that I can't seem to set it using
    regex for
     > all hashes that I am retrieving from Hiera.
     >
     >
     >     If you mean that all keys should lookup with strategy 'deep'
    then you
     >     use the lookup_options to set that for all keys.
     >
     >   Do you mind sharing an example what setting it for all keys
     > potentially look like - I suspect my regex above may not be correct

    The regexp must be anchored at the beginning of the string to be
    recognized as a key regexp.

    So, use this:

    '^.*'



Doesn't that instruct Hiera to use the 'deep' strategy for /all/ lookups where no other strategy is explicitly requested?  Will that not, therefore, alter the behavior of automated data binding and of most calls to the lookup() and hiera() functions?

I'm totally prepared to learn something new today, but to the best of my current knowledge, Hiera 5 has no mechanism for controlling merge behavior whose scope can be limited to just hiera_hash() calls.


True - the above general regexp rule will apply to all keys irrespective of their data type. There is no mechanism to make a regexp rule apply to only a particular data type.

- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/pc75om%24nnj%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to