Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6974

Looking up a 'false' value in hiera.yaml when using data in modules does not return a result.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.8.1
    • Fix Version/s: PUP 4.8.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      false facts resolve as the false string in hiera.yaml

      Show
      false facts resolve as the false string in hiera.yaml
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2016-12-14
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      It was not possible to interpolate a Boolean {{false}} value in a hiera configuration as it ended up being a blank string. Now the value interpolates to the string {{"false"}}.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      simple, rare use case. covered well by unit tests.

      Description

      Using the following hiera.yaml with data in modules, the resolution of a false value does not allow us to look up materials in a false.yaml file. Instead, the entry is non-existent. This requires us to use a hack to have a file that can be found with the false value returning as an empty string.

      ---
      version: 4
      datadir: data
      hierarchy:
        - name: "my_fact"
          backend: yaml
          path: "my_fact/is_%{facts.my_fact}"
      

      We should be able to have my_fact/is_true.yaml and my_fact/is_false.yaml. However, with this bug, we have to have my_fact/is_.yaml and symlink that to my_facts/is_false.yaml for when this issue gets fixed.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                peiriannydd Trevor Vaughan
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: