Jira (PUP-10587) Add plan_hierarchy key to hiera config

8 views
Skip to first unread message

Lucy Wyman (Jira)

unread,
Jul 16, 2020, 7:57:03 PM7/16/20
to puppe...@googlegroups.com
Lucy Wyman created an issue
 
Puppet / Task PUP-10587
Add plan_hierarchy key to hiera config
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/07/16 4:56 PM
Priority: Normal Normal
Reporter: Lucy Wyman

https://github.com/puppetlabs/bolt/issues/1835
The Bolt team is interested in adding a plan_hierarchy key to Hiera's config that specifies the hierarchy to use when calling lookup in a plan outside of an apply block. This would allow users to use their existing Hiera config with Bolt without encountering unnecessary errors and would make it clear that different hierarchies are used in a plan outside of an apply block vs. inside an apply block. This is necessary because per-node data and interpolations do not make sense outside of an apply block because plans don't execute per-node, and other common interpolations like environment and facts are also nonsensical in that context. However, these values do make sense inside apply blocks and are currently supported. Having a new plan_hierarchy hierarchy for plans outside of apply blocks lets users specify what data to use in that context.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Henrik Lindberg (Jira)

unread,
Jul 17, 2020, 5:57:04 AM7/17/20
to puppe...@googlegroups.com
Henrik Lindberg commented on Task PUP-10587
 
Re: Add plan_hierarchy key to hiera config

Did you consider a second instance of hiera/lookup with a separate hiera.yaml file for plans, and then just using one or the other depending on context when doing lookups? You would then get the global/env/module + default layers for free for the plan specific hiera instance. Either name the file plan_hiera.yaml or have something like a relative path ./plan/hiera.yaml to where the regular hiera.yaml is.

I think that would reduce the complexities in implementing this.

Dorin Pleava (Jira)

unread,
Aug 19, 2020, 8:45:02 AM8/19/20
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Change By: Dorin Pleava
Fix Version/s: PUP 6.18.0
Reply all
Reply to author
Forward
0 new messages