X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Ffirewall.pp;h=8cb253d0aee6b7bed9503577876930d10df7d3fb;hb=012515be4fb9bc5435a47e41574dc2ef4221a5d7;hp=484ac80eca671bd03426b6d273ef5f017fcc13dd;hpb=e81d2dd357118ed7157fa2fa5107b57f28c3cdf0;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/firewall.pp b/modules/ganeti2/manifests/firewall.pp index 484ac80ec..8cb253d0a 100644 --- a/modules/ganeti2/manifests/firewall.pp +++ b/modules/ganeti2/manifests/firewall.pp @@ -4,6 +4,7 @@ class ganeti2::firewall { $ganeti_hosts = $ganeti2::params::ganeti_hosts $ganeti_priv = $ganeti2::params::ganeti_priv + $drbd = $ganeti2::params::drbd @ferm::conf { 'ganeti2': content => template('ganeti2/defs.conf.erb') @@ -27,12 +28,6 @@ class ganeti2::firewall { notarule => true, } - @ferm::rule { 'dsa-ganeti-drbd-v4': - description => 'allow ganeti drbd communication', - rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'ganeti-drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', - notarule => true, - } - @ferm::rule { 'dsa-ganeti-kvm-migration-v4': description => 'allow ganeti kvm migration ', rule => 'proto tcp dport 8102 @subchain \'ganeti-kvm-migration\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', @@ -44,4 +39,12 @@ class ganeti2::firewall { rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }', notarule => true, } + + if $drbd { + @ferm::rule { 'dsa-ganeti-drbd-v4': + description => 'allow ganeti drbd communication', + rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'ganeti-drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', + notarule => true, + } + } }