Closed
Description
Discussed in #243
Originally posted by tuxmea December 22, 2023
Request
As a Puppet admin I want to be able to see the module data in case that I select a key with a module name
Solution
Within HDM -> environments -> node -> Key
Check if the selected key first part of the name is a module name by:
- reading the environment.conf
modulepath
setting (usemodules
as default, multiple entries are separated by colon:
, can also be absolute path)- Example:
modulepath = site-modules:modules:/etc/puppetlabs/puppet/modules:../global
- Default:
Basemodulepath:
modulepath = modules:$basemodulepath
Puppet.settings('basemodulepath')
Default:basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
- Example:
- parse the
modulepath
directories in order for a directory with the same name - if the directory exists
- check for
hiera.yaml
inside the directory - if the
hiera.yaml
file exists- show the module button
- if not
- dont show the module button
- check for
- if not
- dont show the module button
If module data exist, a button module
will show up next to the key.
Now HDM switches into module data view.
There should be a button environment
which leads back to the environment data (ideally the one where we switched to module data view).
Within the key list, only module data are shown.
The hiera data directory/file structured is build in the same way as we do it now with environment data.
When selecting a key, one sees the same view as in environment data.