system-config/modules/exim/manifests/init.pp
Dan Prince 3fef067522 Update exim module to install package before file.
Add some requires to the module so that we ensure the
exim package is installed before configuring the etc config
file and starting the service.

Change-Id: I5c464a9b8b6ecbdea7af3a4b9bdf344f3a40c0db
Reviewed-on: https://review.openstack.org/23552
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-05 14:43:17 +00:00

47 lines
997 B
Puppet

class exim(
$mailman_domains = [],
$sysadmin = []
) {
include exim::params
package { $::exim::params::package:
ensure => present,
}
if ($::operatingsystem == 'Redhat') {
service { 'postfix':
ensure => stopped
}
}
service { 'exim':
ensure => running,
name => $::exim::params::service_name,
hasrestart => true,
subscribe => File[$::exim::params::config_file],
require => Package[$::exim::params::package],
}
file { $::exim::params::config_file:
ensure => present,
content => template("${module_name}/exim4.conf.erb"),
group => 'root',
mode => '0444',
owner => 'root',
replace => true,
require => Package[$::exim::params::package],
}
file { '/etc/aliases':
ensure => present,
content => template("${module_name}/aliases.erb"),
group => 'root',
mode => '0444',
owner => 'root',
replace => true,
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79