From 651a4474ef727d3c476455092b1e85079286cfd8 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 12 Jul 2012 15:14:59 +0200 Subject: [PATCH] Only do the ferm stuff for cluster ganeti2.d.o --- modules/ganeti2/manifests/init.pp | 70 ++++++++++++++++--------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 4838bac3..b2645602 100644 --- a/modules/ganeti2/manifests/init.pp +++ b/modules/ganeti2/manifests/init.pp @@ -4,10 +4,6 @@ class ganeti2 { ensure => installed } - package { 'drbd8-utils': - ensure => installed - } - package { 'ganeti-instance-debootstrap': ensure => installed } @@ -16,40 +12,48 @@ class ganeti2 { ensure => installed } - @ferm::rule { 'dsa-ganeti-noded-v4': - description => 'allow ganeti-noded communication', - rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } + case $::cluster { + ganeti2.debian.org: { + package { 'drbd8-utils': + ensure => installed + } - @ferm::rule { 'dsa-ganeti-confd-v4': - description => 'allow ganeti-confd communication', - rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } + @ferm::rule { 'dsa-ganeti-noded-v4': + description => 'allow ganeti-noded communication', + rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', + notarule => true, + } - @ferm::rule { 'dsa-ganeti-rapi-v4': - description => 'allow ganeti-rapi communication', - rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } + @ferm::rule { 'dsa-ganeti-confd-v4': + description => 'allow ganeti-confd communication', + rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', + 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-rapi-v4': + description => 'allow ganeti-rapi communication', + rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_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; }', - 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; }', + notarule => true, + } - @ferm::rule { 'dsa-ganeti-ssh-v4': - description => 'allow ganeti to ssh around', - rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }', - notarule => true, + @ferm::rule { 'dsa-ganeti-ssh-v4': + description => 'allow ganeti to ssh around', + rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }', + notarule => true, + } + } } file { -- 2.39.2