On 15/09/17 16:46, John Baird wrote:
I just realized, while doing some other hiera work with a custom HTTP backend, that this won't work.  It's the same problem I have with the way scoping works for the HTTP backend.  If I don't specify the lookup() key in the manifest with a scope, then puppet ONLY uses GLOBAL and ENVIRONMENT scope and ignores module scope.  This seems undesired.  In that manner, I would have to have my filenames (in the case of file backend) or URIs (as is the case with HTTP backend) contain module scoping in the lookup, so my filename would become lookup('somemodule::somefile.txt") which would THEN have to actually exist in that lookup...


yes, modules cannot bind to names in the global (top) name space.
If they could they would have the potential to step on each other and it will become impossible to resolve a lookup without visiting every module on the modulepath for every lookup.

hiera is not ignoring module scope - it is simply illegal to try to bind to anything that is not in the module's namespace.

I would expect Puppet to use module scope when a lookup is performed within the module if scope is not specified for this lookup.

It simply does not work that way. There are no "relative keys".

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

Reply via email to