diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/debian.pp | 74 | ||||
-rw-r--r-- | manifests/init.pp | 6 | ||||
-rw-r--r-- | manifests/munin.pp | 3 | ||||
-rw-r--r-- | manifests/ssl/base.pp | 2 | ||||
-rw-r--r-- | manifests/status.pp | 1 | ||||
-rw-r--r-- | manifests/status/debian.pp | 3 |
6 files changed, 52 insertions, 37 deletions
diff --git a/manifests/debian.pp b/manifests/debian.pp index 7d1191d..6ae4cee 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -1,40 +1,44 @@ ### debian class apache::debian inherits apache::package { - $config_dir = '/etc/apache2' + $config_dir = '/etc/apache2' - Package[apache] { - name => 'apache2', - } - File[vhosts_dir] { - path => "${config_dir}/sites-enabled", - } - File[modules_dir] { - path => "${config_dir}/mods-enabled", - } - File[htpasswd_dir] { - path => '/var/www/htpasswds', - group => 'www-data', - } - File[default_apache_index] { - path => '/var/www/index.html', - } - file { 'apache_main_config': - path => "${config_dir}/apache2.conf", - source => ["puppet:///modules/site_apache/config/Debian/${::fqdn}/apache2.conf", - "puppet:///modules/site_apache/config/Debian.${::operatingsystemmajrelease}/apache2.conf", - 'puppet:///modules/site_apache/config/Debian/apache2.conf', - 'puppet:///modules/apache/config/Debian/apache2.conf' ], - require => Package['apache'], - notify => Service['apache'], - owner => root, - group => 0, - mode => '0644'; - } - apache::config::global{ 'charset': } - apache::config::global{ 'security': } - file { 'default_debian_apache_vhost': - ensure => absent, - path => '/etc/apache2/sites-enabled/000-default', - } + Package[apache] { + name => 'apache2', + } + File[vhosts_dir] { + path => "${config_dir}/sites-enabled", + } + File[modules_dir] { + path => "${config_dir}/mods-enabled", + } + File[htpasswd_dir] { + path => '/var/www/htpasswds', + group => 'www-data', + } + File[default_apache_index] { + path => '/var/www/index.html', + } + file { 'apache_main_config': + path => "${config_dir}/apache2.conf", + source => [ "puppet:///modules/site_apache/config/Debian.${::lsbdistcodename}/${::fqdn}/apache2.conf", + "puppet:///modules/site_apache/config/Debian/${::fqdn}/apache2.conf", + "puppet:///modules/site_apache/config/Debian.${::lsbdistcodename}/apache2.conf", + 'puppet:///modules/site_apache/config/Debian/apache2.conf', + "puppet:///modules/apache/config/Debian.${::lsbdistcodename}/${::fqdn}/apache2.conf", + "puppet:///modules/apache/config/Debian/${::fqdn}/apache2.conf", + "puppet:///modules/apache/config/Debian.${::lsbdistcodename}/apache2.conf", + 'puppet:///modules/apache/config/Debian/apache2.conf' ], + require => Package['apache'], + notify => Service['apache'], + owner => root, + group => 0, + mode => '0644'; + } + apache::config::global{ 'charset': } + apache::config::global{ 'security': } + file { 'default_debian_apache_vhost': + ensure => absent, + path => '/etc/apache2/sites-enabled/000-default', + } } diff --git a/manifests/init.pp b/manifests/init.pp index 574c212..542e7aa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,7 +17,8 @@ class apache( $cluster_node = '', $manage_shorewall = false, $manage_munin = false, - $no_default_site = false + $no_default_site = false, + $ssl = false ) { case $::operatingsystem { centos: { include apache::centos } @@ -32,5 +33,8 @@ class apache( if $apache::manage_shorewall { include shorewall::rules::http } + if $ssl { + include apache::ssl + } } diff --git a/manifests/munin.pp b/manifests/munin.pp index 8b5bda1..2a04e97 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -1,5 +1,8 @@ # manage apache monitoring things class apache::munin { + + include perl::extensions::libwww + munin::plugin{ [ 'apache_accesses', 'apache_processes', 'apache_volume' ]: } munin::plugin::deploy { 'apache_activity': source => 'apache/munin/apache_activity', diff --git a/manifests/ssl/base.pp b/manifests/ssl/base.pp index ff9baa5..7c17423 100644 --- a/manifests/ssl/base.pp +++ b/manifests/ssl/base.pp @@ -1,7 +1,7 @@ class apache::ssl::base { ::apache::config::include{ 'ssl_defaults.inc': } - if !$apache_no_default_site { + if !$apache::no_default_site { ::apache::vhost::file{ '0-default_ssl': } } } diff --git a/manifests/status.pp b/manifests/status.pp index 1f7ca89..c507013 100644 --- a/manifests/status.pp +++ b/manifests/status.pp @@ -3,6 +3,7 @@ class apache::status { case $::operatingsystem { centos: { include apache::status::centos } + debian: { include apache::status::debian } defaults: { include apache::status::base } } if $apache::manage_munin { diff --git a/manifests/status/debian.pp b/manifests/status/debian.pp new file mode 100644 index 0000000..678bc44 --- /dev/null +++ b/manifests/status/debian.pp @@ -0,0 +1,3 @@ +class apache::status::debian { + ::apache::debian::module { 'status': } +} |