From: Stephen Gran Date: Tue, 11 Sep 2012 19:22:29 +0000 (+0100) Subject: make drbd rule conditional X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=632bff4536d7a7411c38a3e5e5954d67dba12a1a make drbd rule conditional Signed-off-by: Stephen Gran --- diff --git a/modules/ganeti2/manifests/firewall.pp b/modules/ganeti2/manifests/firewall.pp index 484ac80e..8cb253d0 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, + } + } }