1 |
class postfix { |
2 |
# some trick to manage daemon directory, who is arch dependent on mdv |
3 |
$usr_lib = $architecture ? { |
4 |
x86_64 => "lib64", |
5 |
default => "lib" |
6 |
} |
7 |
|
8 |
$path_daemon_directory = "/usr/$usr_lib/postfix/" |
9 |
|
10 |
|
11 |
class base { |
12 |
package { postfix: |
13 |
ensure => installed |
14 |
} |
15 |
|
16 |
service { postfix: |
17 |
ensure => running, |
18 |
subscribe => [ Package['postfix']], |
19 |
path => "/etc/init.d/postfix" |
20 |
} |
21 |
} |
22 |
|
23 |
file { '/etc/postfix/main.cf': |
24 |
ensure => present, |
25 |
owner => root, |
26 |
group => root, |
27 |
mode => 644, |
28 |
require => Package["postfix"], |
29 |
content => "", |
30 |
notify => [Service['postfix']] |
31 |
} |
32 |
|
33 |
|
34 |
class simple_relay inherits base { |
35 |
file { '/etc/postfix/main.cf': |
36 |
content => template("postfix/simple_relay_main.cf"), |
37 |
} |
38 |
} |
39 |
} |