diff options
author | Marknl <mark@e-rave.nl> | 2017-01-10 11:21:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 11:21:20 +0100 |
commit | 32c97619505a28d6f9838d9ebc109f472687fe4f (patch) | |
tree | 827508d5955005d0600a7bc05962ca1586eb6e94 /manifests/host.pp | |
parent | 6d78d6c7b5c7617077260c94d7158b61f430494e (diff) |
Added $host option
Current rule.pp converts the $name into the "HOST" parameter in the file, this can result in these definitions:
```shorewall::host { 'eth0:$VPN_HOSTS':
zone => 'vpn',
options => 'ipsec',
order => 200;
}```
I suggest moving the variable usage from the $name into a $host parameter, so above example becomes:
```shorewall::host { 'vpn-hosts':
zone => 'vpn',
host => 'eth0:$VPN_HOSTS',
options => 'ipsec',
order => 200;
}```
Diffstat (limited to 'manifests/host.pp')
-rw-r--r-- | manifests/host.pp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/manifests/host.pp b/manifests/host.pp index f400223..2510ca7 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -1,10 +1,11 @@ define shorewall::host( $zone, + $host, $options = 'tcpflags,blacklist,norfc1918', $order='100' ){ shorewall::entry{"hosts-${order}-${name}": - line => "${zone} ${name} ${options}" + line => "#${name}\n${zone} ${host} ${options}" } } |