Uploaded image for project: 'Hiera'
  1. Hiera
  2. HI-127

Allow escaping %{...} in hiera data to avoid replacement (add literal function)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HI 2.0.0
    • Component/s: DOCS
    • Labels:
    • Template:
    • Story Points:
      1
    • Sprint:
      Week 2014-4-02 to 2014-4-09

      Description

      UPDATE

      Add a literal function to hiera to allow characters to be included without special interpretation.

      Example: literal('%')

      ORIGINAL

      I have some data that contains Apache variables (such as %

      {SERVER_NAME}, %{QUERY_STRING}, etc )
      in a Hiera file (Yaml backend). However, when I retrieve the value, the string is replaced with
      empty value. For instance, for:

      myserver: http://%{SERVER_NAME}

      I got the value "http//"

      I found out that during the lookup in the YAML backend, the answer is parsed and Hiera
      tries to resolve the variable or replace it by an empty string if the variable is not found.

      We should have a way to escape this from any String or disable the variable resolution
      completely in the order to get the correct value.

      What about escaping with "\" character?
      So, if we have this data in Hiera file:

      myserver: http://%

      {SERVER_NAME}

      We get the correct string:

      myserver: http://%{SERVER_NAME}

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  redmine.exporter redmine.exporter
                • Votes:
                  4 Vote for this issue
                  Watchers:
                  23 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support