X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=3c79be08eaed93e808268f394e47ce01786b098c;hb=7f7977f233e069f392961706a02d656a02a74bc3;hp=887d448164a62a379d07a81d67319f10a4545de5;hpb=c6872f30223f23afe81c6905a061a6a5c38a22f7;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 887d44816..3c79be08e 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,15 +17,58 @@ class ganeti2 { ensure => installed } - @ferm::rule { 'dsa-ganeti-v4': - description => 'Allow ganeti from ganeti master', - rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti\' { saddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, + if $drbd { + package { 'drbd8-utils': + ensure => installed + } } - @ferm::rule { 'dsa-drbd-v4': - description => 'Allow ganeti from ganeti master', - rule => 'proto tcp mod state state (NEW) dport (11000-11999) @subchain \'drbd\' { saddr ($HOST_DRBD_V4) ACCEPT; }', - notarule => true, + file { + '/etc/ganeti/instance-debootstrap/variants.list': + content => template('ganeti2/instance-debootstrap/variants.list.erb'), + require => Package['ganeti-instance-debootstrap'], + ; + '/etc/ganeti/instance-debootstrap/variants/dsa.conf': + content => template('ganeti2/instance-debootstrap/variants/dsa.conf.erb'), + require => Package['ganeti-instance-debootstrap'], + ; + '/etc/ganeti/instance-debootstrap/variants/dsa-wheezy.conf': + content => template('ganeti2/instance-debootstrap/variants/dsa-wheezy.conf.erb'), + require => Package['ganeti-instance-debootstrap'], + ; + '/etc/ganeti/instance-debootstrap/hooks/00-dsa-configure-networking': + content => template('ganeti2/instance-debootstrap/hooks/00-dsa-configure-networking.erb'), + require => Package['ganeti-instance-debootstrap'], + mode => '0555', + ; + '/etc/ganeti/instance-debootstrap/hooks/10-dsa-install-extra-packages': + content => template('ganeti2/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb'), + require => Package['ganeti-instance-debootstrap'], + mode => '0555', + ; + '/etc/ganeti/instance-debootstrap/hooks/20-dsa-install-bootloader': + content => template('ganeti2/instance-debootstrap/hooks/20-dsa-install-bootloader.erb'), + require => Package['ganeti-instance-debootstrap'], + mode => '0555', + ; + '/etc/ganeti/instance-debootstrap/hooks/30-dsa-install-ssh-keys': + content => template('ganeti2/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb'), + require => Package['ganeti-instance-debootstrap'], + mode => '0555', + ; + '/etc/ganeti/instance-debootstrap/hooks/40-dsa-setup-swapfile': + content => template('ganeti2/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb'), + require => Package['ganeti-instance-debootstrap'], + mode => '0555', + ; + '/etc/ganeti/instance-debootstrap/hooks/clear-root-password': + require => Package['ganeti-instance-debootstrap'], + mode => '0444', + ; + '/etc/ganeti/instance-debootstrap/hooks/xen-hvc0': + require => Package['ganeti-instance-debootstrap'], + mode => '0444', + ; } + }