class mail::virtual::web::admin( $postfixadmin_setup_hash = lookup('mail::virtual::web::postfixadmin_setup_hash', undef, undef, $mail::virtual::web::params::postfixadmin_setup_hash), ) { case $postfixadmin_setup_hash { '': { warning("You need to define mail::virtual::web::postfixadmin_setup_hash config") $setup_hash = 'changeme' } } apache::site { "postfixadmin": # Configuration when postfixadmin is installed as a package #docroot => '/usr/share/postfixadmin/public', # Configuration when postfixadmin is manually maintained docroot => "${apache::sites_folder}/postfixadmin/site/public", use => [ "Site postfixadmin" ], mpm => false, } # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856338 file { '/usr/share/postfixadmin/templates_c': ensure => directory, owner => root, group => www-data, mode => '0770', require => [ Package['postfixadmin'], Apache::Site['postfixadmin'] ], } #file { "${apache::sites_folder}/postfixadmin/site/config.inc.php": file { "/etc/postfixadmin/config.inc.php": ensure => present, owner => www-data, group => root, mode => '0640', content => template('mail/virtual/postfixadmin/config.inc.php.erb'), #require => File["${apache::sites_folder}/postfixadmin/site"], require => Package['postfixadmin'], } }