Jira (PUP-11504) puppet lookup fails with server_facts in hiera.yaml

0 views
Skip to first unread message

Simon Hoenscheid (Jira)

unread,
Apr 8, 2022, 9:18:02 AM4/8/22
to puppe...@googlegroups.com
Simon Hoenscheid created an issue
 
Puppet / Bug PUP-11504
puppet lookup fails with server_facts in hiera.yaml
Issue Type: Bug Bug
Affects Versions: PUP 6.25.1
Assignee: Unassigned
Components: Hiera & Lookup
Created: 2022/04/08 6:17 AM
Priority: Normal Normal
Reporter: Simon Hoenscheid

Puppet Version: 6.25.1
Puppet Server Version: PE 2019.8.9
OS Name/Version: CentOS 7

Desired Behavior: puppet lookup on shell is working

Actual Behavior:

At a client I was replacing legacy facts and global variables in the hiera.yaml where this was possible. The client still uses a centralized hiera.yaml, instead of a hiera.yaml per environment.

The hiera.yaml includes a reference to the environment in the datadir:

version: 5
defaults:
  datadir: /etc/puppetlabs/code/%{::environment}/modules/hiera

 

This is working fine. Also with puppet lookup  and --compile parameter on the commandline.

 

Changing this to: 

version: 5
defaults:
datadir: /etc/puppetlabs/code/%{server_facts.environment}/modules/hiera 

 

has a different outcome:

puppetserver still working fine.

puppet lookup  with --compile on the commandline throwing issue value for parameter not found. After reverting the change it's fine again.

The manpage describes server_facts should be resolvable:

https://puppet.com/docs/puppet/7/man/lookup.html#options

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Nirupama Mantha (Jira)

unread,
Apr 12, 2022, 4:15:04 PM4/12/22
to puppe...@googlegroups.com
Nirupama Mantha commented on Bug PUP-11504
 
Re: puppet lookup fails with server_facts in hiera.yaml

Can you try reproducing the issue with 6.26 and let us know if that still exists

Simon Hoenscheid (Jira)

unread,
Apr 19, 2022, 2:37:03 AM4/19/22
to puppe...@googlegroups.com

nirupama I am scheduling a PE update with the customer

Reply all
Reply to author
Forward
0 new messages