From e2e6aafa49ee93783a115874b76189ecc6867b58 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 27 Oct 2010 10:36:01 +0000 Subject: - add a postfix module --- modules/postfix/manifests/init.pp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/postfix/manifests/init.pp (limited to 'modules/postfix/manifests') diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp new file mode 100644 index 00000000..7a1df0a0 --- /dev/null +++ b/modules/postfix/manifests/init.pp @@ -0,0 +1,39 @@ +class postfix { + # some trick to manage daemon directory, who is arch dependent on mdv + $usr_lib = $architecture ? { + x86_64 => "lib64", + default => "lib" + } + + $path_daemon_directory = "/usr/$usr_lib/postfix/" + + + class postfix_base { + package { postfix: + ensure => installed + } + + service { postfix: + ensure => running, + subscribe => [ Package['postfix']], + path => "/etc/init.d/postfix" + } + } + + file { '/etc/postfix/main.cf': + ensure => present, + owner => root, + group => root, + mode => 644, + require => Package["postfix"], + content => "", + notify => [Service['postfix']] + } + + + class postfix_simple_relay inherits postfix_base { + file { '/etc/postfix/main.cf': + content => template("postfix/simple_relay_main.conf"), + } + } +} -- cgit v1.2.1