summaryrefslogtreecommitdiff
path: root/manifests/entry.pp
blob: b6ce7029de58cf5bf5037aac912e952280e0e899 (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
# a core wrapper for all kinds of entries
define shorewall::entry(
  $line,
  $ensure     = present,
  $shorewall  = true,
  $shorewall6 = false,
){
  if $ensure == 'present' {
    $parts = split($name,'-')
    if $shorewall {
      concat::fragment{$name:
        content => "${line}\n",
        order   => $parts[1],
        target  => "/etc/shorewall/puppet/${parts[0]}",
      }
    }
    if $shorewall6 and $shorewall::with_shorewall6 {
      concat::fragment{"shorewall6_${name}":
        content => "${line}\n",
        order   => $parts[1],
        target  => "/etc/shorewall6/puppet/${parts[0]}",
      }
    }
  }
}