-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDM should be able to read global hiera data #330
Comments
I am knee deep into implementing this. It took quite a while but I am finally getting somewhere. Here is a sneak peek: I have a question about the location of the global layer's According to the hiera docs the location of the global hiera.yaml is Since I assume we do not want to start parsing |
looks good. And yes: please make the location of the global hiera.yaml file configurable. |
One minor request: Instead of please use Otherwise people might get confused with hiera hierarchy layers. |
I would be happy to use better terminology. But just to make sure: Do you really think is correct? The documentation very consistently refers to the different levels as "layers". They are introduced here: https://www.puppet.com/docs/puppet/8/hiera_intro.html#hiera_config_layers And they are referred to several times, e.g. here: https://www.puppet.com/docs/puppet/8/hiera_automatic#puppet_lookup, always as "layers". Also, when I use the search feature on the documentation page, the top results for "layers" all refer to the these levels of configuration while a search for "scope" returns only results not related to this concept at all 🤷♂️ |
You are absolutely right! |
And take "global" layer into account when querying data.
Fixes the problem displayed here: #330 (comment)
And take "global" layer into account when querying data.
Fixes the problem displayed here: #330 (comment)
And take "global" layer into account when querying data.
Fixes the problem displayed here: #330 (comment)
* Add hiera layer abstraction ... #330 And take "global" layer into account when querying data. * Remove obsolete error class. * Make location of global hiera.yaml configurable #330 * Fix typo. * Fix markup #330 Fixes the problem displayed here: #330 (comment) * Small fix for rubocop.
Discussed in #299
Originally posted by tuxmea February 15, 2024
In some environments, the global hiera data is used (
/etc/puppetlabs/puppet/hiera.yaml
)HDM should be able to also show global data.
Workflow in HDM:
HDM now reads the global hiera.yaml file, replaces the facts and finds the yaml files for the node and collects all Hiera keys.
The global hiera.yaml file may be absent. It should only be taken into account if it has a hierarchy key.
HDM reads the environment hiera.yaml file, replaces the facts and finds the yaml files for the node and collects all Hiera keys.
When selecting a Hiera key, HDM should show the global directory/file structure similar to environment data on top of the environment data.
Global data and environment data views are each have a border around to visualize that these are different data sources.
Show result must first parse global data and environment data afterwards.
lookup_options are dealt in the same way as single environment data.
The text was updated successfully, but these errors were encountered: