base.pp 992 Bytes
Newer Older
1
class shorewall::base {
2

3
    package { 'shorewall':
4
        ensure => $shorewall::ensure_version,
5 6 7
    }

    # This file has to be managed in place, so shorewall can find it
8 9
    file {
      '/etc/shorewall/shorewall.conf':
10
        require => Package[shorewall],
11
        notify => Service[shorewall],
mh's avatar
mh committed
12
        owner => root, group => 0, mode => 0644;
13 14 15 16
      '/etc/shorewall/puppet':
        ensure => directory,
        require => Package[shorewall],
        owner => root, group => 0, mode => 0644;
mh's avatar
mh committed
17
    }
18

19 20 21 22 23 24 25
    augeas { 'shorewall_module_config_path':
      changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'',
      lens    => 'Shellvars.lns',
      incl    => '/etc/shorewall/shorewall.conf',
      notify  => Service[shorewall];
    }

mh's avatar
mh committed
26
    service{shorewall:
27 28 29 30
        ensure  => running,
        enable  => true,
        hasstatus => true,
        hasrestart => true,
31
        require => Package[shorewall],
32 33
    }
}