I have a site.pp file which looks like this:
Package {allow_virtual => false,}
stage { 'pre': before => Stage['main'] }
stage { 'post': require => Stage['main'] }
resources { 'firewall': purge => true }
node default {
hiera_include('classes')
}
I’d like to be able to set the firewall purge line based on the value of a hiera parameter. Is this possible?
You don't say which version of puppet you're using but this should work with any recent version . Add this to hiera:
Then modify your site.pp like this: