On Thu, Oct 5, 2017 at 6:44 PM, Henrik Lindberg <henrik.lindb...@puppet.com>
wrote:

> On 04/10/17 08:54, John Baird wrote:
>
>>
>> Something like "lookup('/path/to/somefile.txt', scope=false)"... In this
>> manner, the user and more specifically, each lookup call can determine
>> whether or not to include the dotted key.
>>
>>
> You get what you want if you quote the entire key.
>
>   lookup("'/path/to/somefile.txt'")
>
> Note the quotes inside of the string. In lookup any quoted part is taken
> verbatim and will not be subject to interpretation as a 'dig' into the
> value being looked up.
>
> - henrik
>
>
Hi Henrik.

This is not the behaviour that I see.   The fact that interpolated strings
still dig is actually useful for dynamically digging into hashes, that
doesn't help the OP though.....

[root@puppet hieradata]# cat common.yaml
---

foo:
  bar:
    tango: delta

[root@puppet hieradata]# puppet apply -e 'notify { *lookup("foo.bar.tango")*:
}'
...
Notice: delta
Notice: /Stage[main]/Main/Notify[delta]/message: defined 'message' as
'delta'

Regards
Craig

-- 
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/CACxdKhHE07-1TT-oHJ5Ux2t_5fpiN6TAk4noewFnweSvO0T9bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to