Move crontab crazy multipath into dsa-puppet-stuff
[mirror/dsa-puppet.git] / modules / ganeti2 / manifests / init.pp
1 # = Class: ganeti2
2 #
3 # Standard ganeti2 config debian.org hosts
4 #
5 # == Sample Usage:
6 #
7 #   include ganeti2
8 #
9 class ganeti2 {
10
11         include ganeti2::params
12         include ganeti2::firewall
13
14         $drbd = $ganeti2::params::drbd
15
16         package { 'ganeti':
17                 ensure => installed
18         }
19
20         site::linux_module { 'tun': }
21
22         file { '/etc/cron.hourly/puppet-cleanup-watcher-pause-file':
23                 source => 'puppet:///modules/ganeti2/cleanup-watcher-pause-file',
24                 mode    => '0555',
25         }
26
27         if $::debarchitecture == 'arm64' {
28                 file { '/usr/local/bin/qemu-system-aarch64-wrapper':
29                         source => 'puppet:///modules/ganeti2/qemu-system-aarch64-wrapper',
30                         mode   => '0555',
31                 }
32         }
33         if $::cluster == 'ganeti.bm.debian.org' {
34                 file { '/usr/local/sbin/crazy-multipath-restart':
35                         source => 'puppet:///modules/ganeti2/crazy-multipath-restart',
36                         mode   => '0555',
37                 }
38                 file { '/etc/cron.d/puppet-crazy-multipath-restart':
39                         ensure => absent,
40                 }
41                 concat::fragment { 'dsa-puppet-stuff--multipath-restart':
42                         target => '/etc/cron.d/dsa-puppet-stuff',
43                         content  => @("EOF"),
44                                         */15 * * * * root /usr/local/sbin/crazy-multipath-restart
45                                         | EOF
46                 }
47         }
48 }