Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Hiera calling a parameter set in a module

$
0
0
I am wondering if it is possible or if there is a better way for having a yaml file used by Hiera to have dymanic configuration My current hiera config is as follows. :backends: - yaml :hierarchy: - "node/%{::clientcert}" - "role/%{::dec_role}" - "dc/%{::dec_dc}" - common - firewall For a role, I want to create an autofs resource however, I also want to pass in a specific parameter. Yaml file for role is as follows. autofs::mounts: icedrop: mount: /- mapfile: /etc/autofs.d/auto.ice mapcontents: '/srv/ice -fstype=cifs,noperm,credentials=/etc/autofs.d/cred/ice_flat_files %{::ice::params::ice_server}/ICE_Flat_Files' options: --timeout=600 order: 4 Note that I have tired to pass in a parameter I already have set in ice::params::ice_server However, nothing gets passed in, so it means this is a null value I assume at the moment. So my question is, can one pass a parameter into Hiera like you would with a normal class or module or can Hiera call this type of parameter. I could create node yaml file and have this set statically but would prefer to have the one role yaml file and have this working dynamically for all my servers. Hope I am clear and thanks.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>