diff options
Diffstat (limited to 'manifests/centos')
-rw-r--r-- | manifests/centos/itk.pp | 4 | ||||
-rw-r--r-- | manifests/centos/itk_plus.pp | 20 | ||||
-rw-r--r-- | manifests/centos/module.pp | 14 | ||||
-rw-r--r-- | manifests/centos/worker.pp | 5 |
4 files changed, 33 insertions, 10 deletions
diff --git a/manifests/centos/itk.pp b/manifests/centos/itk.pp index 94f0f1c..20f4270 100644 --- a/manifests/centos/itk.pp +++ b/manifests/centos/itk.pp @@ -5,8 +5,6 @@ class apache::centos::itk inherits apache::centos { name => 'httpd-itk', } File['apache_service_config']{ - source => [ "puppet://$server/modules/site-apache/service/CentOS/${fqdn}/httpd.itk", - "puppet://$server/modules/site-apache/service/CentOS/httpd.itk", - "puppet://$server/modules/apache/service/CentOS/httpd.itk" ], + source => "puppet:///modules/apache/service/${::operatingsystem}/httpd.itk" } } diff --git a/manifests/centos/itk_plus.pp b/manifests/centos/itk_plus.pp new file mode 100644 index 0000000..0df92c8 --- /dev/null +++ b/manifests/centos/itk_plus.pp @@ -0,0 +1,20 @@ +# http://hostby.net/home/2008/07/12/centos-5-and-mpm-itk/ +class apache::centos::itk_plus inherits apache::centos::itk { + Exec['adjust_pidfile']{ + command => "sed -i 's/^PidFile \\(.*\\)/#PidFile \\1/g' /etc/httpd/conf/httpd.conf", + unless => "grep -qE '^#PidFile ' /etc/httpd/conf/httpd.conf", + } + Exec['adjust_listen']{ + command => "sed -i 's/^Listen 80/#Listen 80/g' /etc/httpd/conf/httpd.conf", + unless => "grep -qE '^#Listen 80' /etc/httpd/conf/httpd.conf", + } + + Apache::Config::Global['00-listen.conf']{ + ensure => 'present', + content => template("apache/itk_plus/${::operatingsystem}/00-listen.conf.erb"), + } + + File['apache_service_config']{ + source => "puppet:///modules/apache/service/CentOS/httpd.itk_plus" + } +} diff --git a/manifests/centos/module.pp b/manifests/centos/module.pp index 4bbf251..3220d1f 100644 --- a/manifests/centos/module.pp +++ b/manifests/centos/module.pp @@ -3,20 +3,20 @@ define apache::centos::module( $source = '', $destination = '' ){ - $modules_dir = "$apache::centos::config_dir/modules.d" + $modules_dir = "${apache::centos::config_dir}/modules.d" $real_destination = $destination ? { '' => "${modules_dir}/${name}.so", default => $destination, } $real_source = $source ? { '' => [ - "puppet://$server/modules/site-apache/modules.d/${fqdn}/${name}.so", - "puppet://$server/modules/site-apache/modules.d/${apache_cluster_node}/${name}.so", - "puppet://$server/modules/site-apache/modules.d/${name}.so", - "puppet://$server/modules/apache/modules.d/${operatingsystem}/${name}.so", - "puppet://$server/modules/apache/modules.d/${name}.so" + "puppet:///modules/site_apache/modules.d/${::fqdn}/${name}.so", + "puppet:///modules/site_apache/modules.d/${apache::cluster_node}/${name}.so", + "puppet:///modules/site_apache/modules.d/${name}.so", + "puppet:///modules/apache/modules.d/${::operatingsystem}/${name}.so", + "puppet:///modules/apache/modules.d/${name}.so" ], - default => "puppet://$server/$source", + default => "puppet:///$source", } file{"modules_${name}.conf": ensure => $ensure, diff --git a/manifests/centos/worker.pp b/manifests/centos/worker.pp new file mode 100644 index 0000000..f374bb7 --- /dev/null +++ b/manifests/centos/worker.pp @@ -0,0 +1,5 @@ +class apache::centos::worker inherits apache::centos { + File['apache_service_config']{ + source => "puppet:///modules/apache/service/${::operatingsystem}/httpd.worker" + } +} |