summaryrefslogtreecommitdiff
path: root/manifests/docker.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/docker.pp')
-rw-r--r--manifests/docker.pp32
1 files changed, 6 insertions, 26 deletions
diff --git a/manifests/docker.pp b/manifests/docker.pp
index 5cc1e68..3f96b0e 100644
--- a/manifests/docker.pp
+++ b/manifests/docker.pp
@@ -1,28 +1,8 @@
-# See http://serverfault.com/questions/579726/docker-shorewall
-class firewall::docker($device = 'eth0') {
- class { 'firewall::forwarding': }
-
- shorewall::masq { "${device}-dock":
- interface => "${device}",
- source => '172.17.0.0/16',
- order => '10',
- }
-
- shorewall::zone { 'dock':
- type => 'ipv4',
- order => '10',
- }
-
- shorewall::policy { 'dock-all':
- sourcezone => 'dock',
- destinationzone => 'all',
- policy => 'ACCEPT',
- order => 10,
- }
-
- shorewall::interface { 'docker0':
- zone => 'dock',
- rfc1918 => false,
- options => 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
+class firewall::docker(
+ $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'),
+ $device = 'eth0',
+) {
+ class { "firewall::implementations::${implementation}::docker":
+ device => $device,
}
}