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

setting a function as value via hiera

$
0
0
Hi, I'm currently using the puppet/apache module to manage apache. I have lot's of servers with large blocks of rewrite rules, but those rewrite rules are most times the same, so I want to save them to a seperate file, read that file and add it as a custom fragment to the apache configuration. This works like a charm with puppet code. apache::vhost { 'xyz.com': port => '80', docroot => '/var/www', custom_fragment => file('role/apache/rules.conf'), } but I want to give all virtualhost configuration to hiera and use create_resources to build the vhost configurations. Like this: apache::vhosts: xyz.com: port: '80' docroot: '/var/www' custom_fragment: file('role/apache/rules.conf') this is adding only the text "file('role/apache/rules.conf') to the apache configuration it is not executing the function. Is there any way to achieve this. Thank you in advance.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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