X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=33f9c2107fe30fc5c6d6f16117bde99ceef2109c;hb=dfd572c2f7cc99584b197f63d97a6181283b670f;hp=9333a8b29444e34b70c9e124a73bc8a7520b6fb1;hpb=d7968da127e174498bf1e122bb879f3e87c590ba;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 9333a8b29..33f9c2107 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 { 'ganeti': ensure => installed } @@ -16,9 +17,60 @@ 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 + } } + + site::linux_module { 'tun': } + + 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', + ; + } + }