Skip to content

OSP: literal function and braces #1175

Open
@halfninja

Description

@halfninja

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}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis ticket has been accepted to our backlog and migrated internally

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions