Queston: Using the roles & profiles method, is it possible to use 'puppetlabs-apache', '8.3.0'
with a hiera lookup?
Context:
I am using
mod 'puppetlabs-apache', '8.3.0'
to configure an apache server. I have a large number of apache re-write rules for various sites.Each site is configured hiera, e.g hiera.yaml:
paths: - site/%{::site}.yaml - role/%{::role}.yaml
where a webapp.pp role installs & configures
apache
it would be nice to lookup apache config in a site-dependent fashion, but can't find any documentation that helps
Notes
- I have found a similar question here, but don't think that covers my particular use-case
- If hiera is unavailable for this module I could perform some logic in webapp.pp, e.g. something like this:
If ($facts['site'] == 'SITE-A') {outline rewrites for SITE-A}
- however, this approach feels rather messy