X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=3c79be08eaed93e808268f394e47ce01786b098c;hb=a7c62e30b552b148e001c663a005cdb7ba69ce19;hp=8630c1306a1a6352c0b8e2be42092f1790c8cb95;hpb=dac3e41213e7870450d3e05cae99870765e1f927;p=dsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 8630c130..3c79be08 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) daddr ($HOST_DRBD_4) 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', + ; } + }