X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=f5032041ac59aa8dd54935403021fe82fb67a631;hb=47e9ce49040948746aa82436b8b8646a741d366e;hp=b7b1b59f59f0ffdf2a67f532447462c0edc1ec7e;hpb=72f40e1fd87426f75b0b6be202efc79893476ac2;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index b7b1b59f5..f5032041a 100644 --- a/modules/ganeti2/manifests/init.pp +++ b/modules/ganeti2/manifests/init.pp @@ -1,11 +1,80 @@ +# = Class: ganeti2 +# +# Standard ganeti2 config debian.org hosts +# +# == Sample Usage: +# +# include ganeti2 +# class ganeti2 { - package { 'ganeti2': + include ganeti2::params + include ganeti2::firewall + + $drbd = $ganeti2::params::drbd + + package { 'ganeti': ensure => installed } - package { 'drbd8-utils': + package { 'ganeti-instance-debootstrap': ensure => installed } + 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', + ; + } + }