diff options
author | Olivier Blin <dev@blino.org> | 2015-11-22 02:09:53 +0100 |
---|---|---|
committer | Olivier Blin <dev@blino.org> | 2015-11-30 01:32:43 +0100 |
commit | 4ad008a4880c770205d0ee9afdf6c522c284788a (patch) | |
tree | 1e0a3cde37b3d497f722e2a7d3fe550fd9ca07be /modules/apache | |
parent | 396da52d807c0e1d110ba60ba093d27c70234630 (diff) | |
download | puppet-4ad008a4880c770205d0ee9afdf6c522c284788a.tar puppet-4ad008a4880c770205d0ee9afdf6c522c284788a.tar.gz puppet-4ad008a4880c770205d0ee9afdf6c522c284788a.tar.bz2 puppet-4ad008a4880c770205d0ee9afdf6c522c284788a.tar.xz puppet-4ad008a4880c770205d0ee9afdf6c522c284788a.zip |
apache: use proper conf.d dir on Mageia >= 2
Diffstat (limited to 'modules/apache')
-rw-r--r-- | modules/apache/manifests/base.pp | 10 | ||||
-rw-r--r-- | modules/apache/manifests/cve-2011-3192.pp | 3 | ||||
-rw-r--r-- | modules/apache/manifests/mod/php.pp | 2 | ||||
-rw-r--r-- | modules/apache/manifests/mod/ssl.pp | 2 | ||||
-rw-r--r-- | modules/apache/manifests/mod/wsgi.pp | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp index 18c9a8bf..d56e9100 100644 --- a/modules/apache/manifests/base.pp +++ b/modules/apache/manifests/base.pp @@ -11,9 +11,13 @@ class apache::base { alias => 'apache-server', } - # only needed on mga1 and mga2 - if ($::lsbdistrelease == '1') or ($::lsbdistrelease == '2') { + if versioncmp($::lsbdistrelease, '2') <= 0 { + $conf_d = '/etc/httpd/conf.d' + + # only needed on mga1 and mga2 package { $apache::var::pkg_conf: } + } else { + $conf_d = '/etc/httpd/conf/conf.d' } service { 'httpd': @@ -27,7 +31,7 @@ class apache::base { } apache::config { - '/etc/httpd/conf.d/customization.conf': + "${conf_d}/customization.conf": content => template('apache/customization.conf'), require => Package[$apache::var::pkg_conf]; '/etc/httpd/conf/vhosts.d/00_default_vhosts.conf': diff --git a/modules/apache/manifests/cve-2011-3192.pp b/modules/apache/manifests/cve-2011-3192.pp index c0f1c651..0ec3dcd3 100644 --- a/modules/apache/manifests/cve-2011-3192.pp +++ b/modules/apache/manifests/cve-2011-3192.pp @@ -1,8 +1,9 @@ class apache::cve-2011-3192 { + include apache::base # temporary protection against CVE-2011-3192 # http://httpd.apache.org/security/CVE-2011-3192.txt apache::config { - '/etc/httpd/conf.d/CVE-2011-3192.conf': + "${apache::base::conf_d}/CVE-2011-3192.conf": content => template('apache/CVE-2011-3192.conf'), } } diff --git a/modules/apache/manifests/mod/php.pp b/modules/apache/manifests/mod/php.pp index c5de893e..2c8d6733 100644 --- a/modules/apache/manifests/mod/php.pp +++ b/modules/apache/manifests/mod/php.pp @@ -4,7 +4,7 @@ class apache::mod::php { package { 'apache-mod_php': } - apache::config { '/etc/httpd/conf.d/mod_php.conf': + apache::config { "${apache::base::conf_d}/mod_php.conf": content => template('apache/mod/php.conf'), } } diff --git a/modules/apache/manifests/mod/ssl.pp b/modules/apache/manifests/mod/ssl.pp index 9065c5cc..ab3d24e4 100644 --- a/modules/apache/manifests/mod/ssl.pp +++ b/modules/apache/manifests/mod/ssl.pp @@ -14,7 +14,7 @@ class apache::mod::ssl { apache::config { '/etc/httpd/conf/vhosts.d/01_default_ssl_vhost.conf': content => template('apache/01_default_ssl_vhost.conf'); - '/etc/httpd/conf.d/ssl_vhost.conf': + "${apache::base::conf_d}/ssl_vhost.conf": content => template('apache/mod/ssl_vhost.conf'); } } diff --git a/modules/apache/manifests/mod/wsgi.pp b/modules/apache/manifests/mod/wsgi.pp index d2ab72d2..7f4fb719 100644 --- a/modules/apache/manifests/mod/wsgi.pp +++ b/modules/apache/manifests/mod/wsgi.pp @@ -6,7 +6,7 @@ class apache::mod::wsgi { ensure => directory, } - apache::config { '/etc/httpd/conf.d/mod_wsgi.conf': + apache::config { "${apache::base::conf_d}/mod_wsgi.conf": content => template('apache/mod/wsgi.conf'), } } |