X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=5e03c24123b4a418ba216af52f617af6c8e81a2a;hb=821837e1e054003f4431e81da6b24639c41b2a78;hp=79a2ba16a608b75334f94774a3255288d40d8bec;hpb=2bb51a5d76d106f4ea097f5a075e24a848de5bd5;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index 79a2ba16a..5e03c2412 100644 --- a/modules/ganeti2/manifests/init.pp +++ b/modules/ganeti2/manifests/init.pp @@ -1,42 +1,48 @@ +# = Class: ganeti2 +# +# Standard ganeti2 config debian.org hosts +# +# == Sample Usage: +# +# include ganeti2 +# class ganeti2 { - package { 'ganeti2': - ensure => installed - } + include ganeti2::params + include ganeti2::firewall - package { 'drbd8-utils': - ensure => installed - } - - package { 'ganeti-instance-debootstrap': - ensure => installed - } + $drbd = $ganeti2::params::drbd - package { 'ganeti-htools': + package { 'ganeti': ensure => installed } - @ferm::rule { 'dsa-ganeti-noded-v4': - description => 'allow ganeti-noded communication between', - rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } - - @ferm::rule { 'dsa-ganeti-confd-v4': - description => 'allow ganeti-confd communication', - rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } - - @ferm::rule { 'dsa-ganeti-rapi-v4': - description => 'allow ganeti-rapi communication', - rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }', - notarule => true, - } - - @ferm::rule { 'dsa-drbd-v4': - description => 'allow drbd communication', - rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }', - notarule => true, + site::linux_module { 'tun': } + + file { '/etc/cron.hourly/puppet-cleanup-watcher-pause-file': + source => 'puppet:///modules/ganeti2/cleanup-watcher-pause-file', + mode => '0555', + } + + if $::debarchitecture == 'arm64' { + file { '/usr/local/bin/qemu-system-aarch64-wrapper': + source => 'puppet:///modules/ganeti2/qemu-system-aarch64-wrapper', + mode => '0555', + } + } + if $::cluster == 'ganeti.bm.debian.org' { + file { '/usr/local/sbin/crazy-multipath-restart': + source => 'puppet:///modules/ganeti2/crazy-multipath-restart', + mode => '0555', + } + file { '/etc/cron.d/puppet-crazy-multipath-restart': + ensure => absent, + } + concat::fragment { 'dsa-puppet-stuff--multipath-restart': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @("EOF"), + */15 * * * * root /usr/local/sbin/crazy-multipath-restart + | EOF + } } }