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