You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is the intended behavior for lookup or a bug. Also the documentation for the literal() seems to be wrong: puppetlabs/puppet-docs#1149 (which made this bug even more confusing).
The text was updated successfully, but these errors were encountered:
lookup - looks up a key using Hiera, and interpolates the value into a string alias - looks up a key using Hiera, and uses the value as a replacement for the enclosing string.
The difference between the two is that lookup() is doing an interpolation pass where as alias() just copies the value verbatim, so the %{} becomes an empty string in the second result.
While we're on literal() matters, there is another unexpected behavior I saw ppl were complaining about..
Adding the following will raise a syntax error during the catalog compilation:
braces4: "%{literal('%{}')}"
I'm not sure if it's bug or feature though.. I feel it as a bug, but I can understand that %{} should be interpreted first.. though I'd expect no interpretation in the literal() arguments..
Describe the Bug
Hi, I've the following code:
(
echo
resource from https://forge.puppet.com/modules/ipcrm/echo/readme which is basically a notify)This outputs:
Expected Behavior
I expect the same output three times:
Steps to Reproduce
Above code with puppet 8.5.1 or 7.29.1
Additional Context
I'm not sure if this is the intended behavior for lookup or a bug. Also the documentation for the
literal()
seems to be wrong: puppetlabs/puppet-docs#1149 (which made this bug even more confusing).The text was updated successfully, but these errors were encountered: