From: Peter Palfrader Date: Fri, 23 Sep 2016 19:48:52 +0000 (+0200) Subject: We have no lsbmajdistrelease <= 7 hosts anymore X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=c519bff9d7a0f549aef31b0a1cbaa51bb0b1804a;p=mirror%2Fdsa-puppet.git We have no lsbmajdistrelease <= 7 hosts anymore --- diff --git a/modules/apache2/manifests/config.pp b/modules/apache2/manifests/config.pp index d185e4239..59c14df31 100644 --- a/modules/apache2/manifests/config.pp +++ b/modules/apache2/manifests/config.pp @@ -16,48 +16,30 @@ define apache2::config ( default: { fail ( "Unknown ensure value: '$ensure'" ) } } - if $::lsbmajdistrelease <= 7 { - if $content { - file { "/etc/apache2/conf.d/${name}": - ensure => $ensure, - content => $content, - require => Package['apache2'], - notify => Exec['service apache2 reload'], - } - } else { - file { "/etc/apache2/conf.d/${name}": - ensure => $ensure, - source => $source, - require => Package['apache2'], - notify => Exec['service apache2 reload'], - } + if $content { + file { "/etc/apache2/conf-available/${name}.conf": + ensure => $ensure, + content => $content, + require => Package['apache2'], + notify => Exec['service apache2 reload'], } } else { - if $content { - file { "/etc/apache2/conf-available/${name}.conf": - ensure => $ensure, - content => $content, - require => Package['apache2'], - notify => Exec['service apache2 reload'], - } - } else { - file { "/etc/apache2/conf-available/${name}.conf": - ensure => $ensure, - source => $source, - require => Package['apache2'], - notify => Exec['service apache2 reload'], - } + file { "/etc/apache2/conf-available/${name}.conf": + ensure => $ensure, + source => $source, + require => Package['apache2'], + notify => Exec['service apache2 reload'], } + } - $link_ensure = $ensure ? { - present => link, - absent => absent - } + $link_ensure = $ensure ? { + present => link, + absent => absent + } - file { "/etc/apache2/conf-enabled/${name}.conf": - ensure => $link_ensure, - target => "../conf-available/${name}.conf", - notify => Exec['service apache2 reload'], - } + file { "/etc/apache2/conf-enabled/${name}.conf": + ensure => $link_ensure, + target => "../conf-available/${name}.conf", + notify => Exec['service apache2 reload'], } }