diff --git a/manifests/init.pp b/manifests/init.pp index 961d8b2..4715e1c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,7 @@ class mailman( $multihost = false, ) { - include ::httpd + include ::apache package { 'mailman': ensure => installed, @@ -22,11 +22,11 @@ class mailman( require => Package['mailman'], } } else { - ::httpd::vhost { $vhost_name: - port => 80, - docroot => '/var/www/', + $port = 80 + $docroot = '/var/www/' + ::apache::vhost::custom { $vhost_name: priority => '50', - template => 'mailman/mailman.vhost.erb', + content => template('mailman/mailman.vhost.erb'), } file { '/etc/mailman/mm_cfg.py': ensure => present, @@ -46,15 +46,8 @@ class mailman( } } - httpd_mod { 'rewrite': - ensure => present, - before => Service['httpd'], - } - - httpd_mod { 'cgid': - ensure => present, - before => Service['httpd'], - } + include ::apache::mod::rewrite + include ::apache::mod::cgid file { '/var/www/index.html': ensure => present, diff --git a/manifests/site.pp b/manifests/site.pp index b79c99b..18e7a31 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -35,7 +35,7 @@ define mailman::site ( $default_url_host, $install_languages = ['en']) { - include ::httpd + include ::apache $root = "/srv/mailman/${name}" $dirs = [ @@ -98,11 +98,13 @@ define mailman::site ( # within the vhost template when evaluated as part of the vhost # define (which will override $name). $mailman_site_name = $name - ::httpd::vhost { $default_url_host: - port => 80, - docroot => '/var/www/', + $port = 80 + $docroot = '/var/www/' + $srvname = $default_url_host + $options = 'Indexes FollowSymLinks MultiViews' + ::apache::vhost::custom { $default_url_host: priority => '50', - template => 'mailman/mailman_multihost.vhost.erb', + content => template('mailman/mailman_multihost.vhost.erb'), } file { "/etc/init.d/mailman-${name}":