aboutsummaryrefslogtreecommitdiff
path: root/manifests/base.pp
blob: 937b83ba56d088b19248cbfe2e757d393cc1c1e0 (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
class shorewall::base {
    package { 'shorewall':
        ensure => $shorewall_ensure_version,
    }

    # This file has to be managed in place, so shorewall can find it
    file {
      '/etc/shorewall/shorewall.conf':
        # use OS specific defaults, but use Default if no other is found
        source => [
            "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf.${::operatingsystem}",
            "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf",
            "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}.${::lsbdistcodename}",
            "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}",
            "puppet:///modules/site_shorewall/shorewall.conf",
            "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}.${::lsbdistcodename}",
            "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}.${::lsbmajdistrelease}",
            "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}",
            "puppet:///modules/shorewall/shorewall.conf"
        ],
        require => Package[shorewall],
        notify => Service[shorewall],
        owner => root, group => 0, mode => 0644;
      '/etc/shorewall/puppet':
        ensure => directory,
        require => Package[shorewall],
        owner => root, group => 0, mode => 0644;
    }

    service{shorewall:
        ensure  => running,
        enable  => true,
        hasstatus => true,
        hasrestart => true,
        require => Package[shorewall],
    }
}