From: Peter Palfrader Date: Fri, 23 Sep 2016 19:53:00 +0000 (+0200) Subject: Support nocontentok for apache2::config X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=sidebyside;h=a6d485f35d75449e7da98ca92b3e5dceecce4bd6;p=mirror%2Fdsa-puppet.git Support nocontentok for apache2::config --- diff --git a/modules/apache2/manifests/config.pp b/modules/apache2/manifests/config.pp index 0bb6a6e49..13697cba9 100644 --- a/modules/apache2/manifests/config.pp +++ b/modules/apache2/manifests/config.pp @@ -1,6 +1,7 @@ define apache2::config ( $source=undef, $content=undef, + $nocontentok=undef, $ensure=present ) { @@ -8,7 +9,7 @@ define apache2::config ( case $ensure { present: { - if ! ($source or $content) { + if ! ($source or $content or $nocontentok) { fail ( "No configuration found for ${name}" ) } @@ -19,7 +20,7 @@ define apache2::config ( require => Package['apache2'], notify => Exec['service apache2 reload'], } - } else { + } elsif $source { file { "/etc/apache2/conf-available/${name}.conf": ensure => $ensure, source => $source,