[PUP-6974] Looking up a 'false' value in hiera.yaml when using data in modules does not return a result. Created: 2016/12/05  Updated: 2017/01/20  Resolved: 2016/12/12

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 4.8.1
Fix Version/s: PUP 4.8.2

Type: Bug Priority: Normal
Reporter: Trevor Vaughan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance Criteria:

false facts resolve as the false string in hiera.yaml

Epic Link: Productize 'lookup'
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 Contact: Eric Thompson
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.



 Comments   
Comment by Henrik Lindberg [ 2016/12/05 ]

Ping Thomas Hallgren

Comment by Henrik Lindberg [ 2016/12/06 ]

Merged to master at: 6845453

Generated at Wed Nov 13 16:52:21 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.