X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=33f9c2107fe30fc5c6d6f16117bde99ceef2109c;hb=2af6c8ab92006da11ea8fc8f2557fd3b56d92efc;hp=3605b583e9cb82b5598d87493cfaa37ed871ca2c;hpb=83f14aaf89b77bb64cac65f9c455062bd3fc4c74;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 3605b583e..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 + + $drbd = $ganeti2::params::drbd - package { 'drbd8-utils': + package { 'ganeti': ensure => installed } @@ -16,15 +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 + } } - @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_V4) ACCEPT; }', - notarule => true, + 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', + ; } + }