base.pp 1.47 KB
Newer Older
1
class shorewall::base {
2
    package { 'shorewall':
3 4 5 6
        ensure => present,
    }

    # This file has to be managed in place, so shorewall can find it
7 8 9 10
    file {
      '/etc/shorewall/shorewall.conf':
        # use OS specific defaults, but use Default if no other is found
        source => [
mh's avatar
mh committed
11
            "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf.${operatingsystem}",
12
            "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf",
mh's avatar
mh committed
13 14
            "puppet:///modules/site-shorewall/shorewall.conf.${operatingsystem}.${lsbdistcodename}",
            "puppet:///modules/site-shorewall/shorewall.conf.${operatingsystem}",
15
            "puppet:///modules/site-shorewall/shorewall.conf",
mh's avatar
mh committed
16 17 18
            "puppet:///modules/shorewall/shorewall.conf.${operatingsystem}.${lsbdistcodename}",
            "puppet:///modules/shorewall/shorewall.conf.${operatingsystem}.${lsbmajdistrelease}",
            "puppet:///modules/shorewall/shorewall.conf.${operatingsystem}",
19
            "puppet:///modules/shorewall/shorewall.conf"
20
        ],
21
        require => Package[shorewall],
22
        notify => Service[shorewall],
mh's avatar
mh committed
23
        owner => root, group => 0, mode => 0644;
24 25 26 27
      '/etc/shorewall/puppet':
        ensure => directory,
        require => Package[shorewall],
        owner => root, group => 0, mode => 0644;
mh's avatar
mh committed
28
    }
29

mh's avatar
mh committed
30
    service{shorewall:
31 32 33 34
        ensure  => running,
        enable  => true,
        hasstatus => true,
        hasrestart => true,
35
        require => Package[shorewall],
36 37
    }
}