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

Hiera Deep Merge inside create_resources

$
0
0
Hello, I'm trying to do a merge inside create_resources class but the hash is not being merged correctly, I think the guilty is the hash name for each instance to be configured. **Hiera Global Config** version: 5 hierarchy: - name: "Common Merge Policy" path: "C:/ProgramData/PuppetLabs/code/environments/hieradata/merge_policy.yaml" - name: "Node specific configuration" path: "C:/ProgramData/PuppetLabs/code/environments/hieradata/%{trusted.certname}.yaml" - name: "AppServer specific configuration" path: "C:/ProgramData/PuppetLabs/code/environments/%{environment}/hieradata/config.yaml" **Merge Policy** lookup_options: "^config::config_sites::(.*)::siteparams$": merge: strategy: deep **Common config** config::config_sites: siteparams: controller: 8000 dispatcher: 8102 **Node Specific config** config::config_sites: INSTANCE1: siteparams: controller: 4000 **Crete_Resources called class** define m4appconfig::config_sites ( $siteparams = {}, $servers = {} ){ The problem is that the retrieved hash is the defined in Node Specific YAML and it's not merged with the Common one in order to populate the whole hash with the default value for the dispatcher key. I think this could happen because in the node specific YAML i'm specifying a list of instance to configure and inside each instance in the hash I hold all the customized config for each one. I'm doing this in the correct way? Or should I change my approach?. Thank you.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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