From c955e02a3b930b81092d182633b7830735211250 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 25 Mar 2012 12:26:37 +0000 Subject: split apache::base in a separate file --- modules/apache/manifests/base.pp | 35 +++++++++++++++++++++++++++++++++++ modules/apache/manifests/init.pp | 37 ------------------------------------- 2 files changed, 35 insertions(+), 37 deletions(-) create mode 100644 modules/apache/manifests/base.pp (limited to 'modules/apache') diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp new file mode 100644 index 00000000..e94c596b --- /dev/null +++ b/modules/apache/manifests/base.pp @@ -0,0 +1,35 @@ +class apache::base { + + # number of time the log file are rotated before being removed + $httpdlogs_rotate = '24' + + $apache_user = 'apache' + $apache_group = 'apache' + + package { 'apache-mpm-prefork': + alias => 'apache', + } + + package { 'apache-conf': } + + service { 'httpd': + alias => 'apache', + subscribe => [ Package['apache-mpm-prefork'] ], + } + + exec { 'service httpd configtest': + refreshonly => true, + notify => Service['apache'], + } + + apache::config { + '/etc/httpd/conf.d/customization.conf': + content => template('apache/customization.conf'); + '/etc/httpd/conf/vhosts.d/00_default_vhosts.conf': + content => template('apache/00_default_vhosts.conf'); + } + + file { '/etc/logrotate.d/httpd': + content => template('apache/logrotate') + } +} diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index 3bc298f8..e1e7d85b 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -1,41 +1,4 @@ class apache { - class base { - - # number of time the log file are rotated before being removed - $httpdlogs_rotate = "24" - - $apache_user = 'apache' - $apache_group = 'apache' - - package { "apache-mpm-prefork": - alias => apache, - } - - package { "apache-conf": } - - service { httpd: - alias => apache, - subscribe => [ Package['apache-mpm-prefork'] ], - } - - exec { "service httpd configtest": - refreshonly => true, - notify => Service["apache"], - } - - apache::config { - "/etc/httpd/conf.d/customization.conf": - content => template("apache/customization.conf"); - "/etc/httpd/conf/vhosts.d/00_default_vhosts.conf": - content => template("apache/00_default_vhosts.conf"); - } - - file { "/etc/logrotate.d/httpd": - content => template("apache/logrotate") - } - } - - define vhost_base($content = '', $location = '/dev/null', $use_ssl = false, -- cgit v1.2.1