Open
Description
Describe the Change You Would Like
The documentation for the Hiera literal
function says this:
This is useful when dealing with Apache config files, for example, which might include text such as %{SERVER_NAME}. For example:
server_name_string: "%{literal('%SERVER_NAME')}"
The latter example works fine - the issue is with "such as %{SERVER_NAME}". A reasonable reader would then expect to be able to do this:
server_name_string: "%{literal('%{SERVER_NAME}')}"
but it fails (tested in Hiera from Puppet 8.6.0):
Syntax error in string: %{literal('%{SERVER_NAME}')}
This may be as expected behaviour but in that case the documentation should demonstrate how to work around this, such as
server_name_string: "%{literal('%')}{SERVER_NAME}"