X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=bacb78cf91b704722162e6e369c952cb494d6c3c;hb=e81d2dd357118ed7157fa2fa5107b57f28c3cdf0;hp=6cc0763ad3ce46fa9db42fd7bc1891445ed72ab8;hpb=62c5e87035a43ecd0fa1cbf09f96e6fe210e26ad;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 6cc0763ad..bacb78cf9 100644 --- a/modules/ganeti2/manifests/init.pp +++ b/modules/ganeti2/manifests/init.pp @@ -1,10 +1,11 @@ class ganeti2 { - package { 'ganeti2': - ensure => installed - } + include ganeti2::params + include ganeti2::firewall - package { 'drbd8-utils': + $drbd = $ganeti2::params::drbd + + package { 'ganeti2': ensure => installed } @@ -16,40 +17,10 @@ class ganeti2 { ensure => installed } - @ferm::rule { 'dsa-ganeti-noded-v4': - description => 'allow ganeti-noded communication between', - 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-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-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-drbd-v4': - description => 'allow drbd communication', - rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', - notarule => true, - } - - @ferm::rule { 'dsa-ganeti-migrate': - description => 'allow kvm to migrate instances', - rule => 'proto tcp dport 8102 @subchain \'ganeti-migrate\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', - notarule => true, - } - - @ferm::rule { 'dsa-ganeti-ssh': - 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, + if $drbd { + package { 'drbd8-utils': + ensure => installed + } } file { @@ -79,6 +50,12 @@ class ganeti2 { content => template('ganeti2/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb'), mode => '0555', ; + '/etc/ganeti/instance-debootstrap/hooks/clear-root-password': + mode => '0444', + ; + '/etc/ganeti/instance-debootstrap/hooks/xen-hvc0': + mode => '0444', + ; } }