aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postfix/manifests/init.pp
blob: 7a1df0a08083b796beb65bb5882bc86fc82d9937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"),
        }
    }
}