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.
↧