]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/buildd/manifests/init.pp
Try with the right file
[dsa-puppet.git] / modules / buildd / manifests / init.pp
1 class buildd ($ensure=present) {
2
3         include schroot
4
5         package { 'sbuild':
6                 ensure => installed,
7                 tag    => extra_repo,
8         }
9         package { 'libsbuild-perl':
10                 ensure => installed,
11                 tag    => extra_repo,
12                 before => Package['sbuild']
13         }
14
15         package { 'apt-transport-https':
16                 ensure => installed,
17         }
18         if $ensure == present {
19                 package { 'dupload':
20                         ensure => installed,
21                 }
22                 file { '/etc/dupload.conf':
23                         source  => 'puppet:///modules/buildd/dupload.conf',
24                         require => Package['dupload'],
25                 }
26                 site::linux_module { 'dm_snapshot': }
27                 ferm::module { 'nf_conntrack_ftp': }
28         }
29
30         site::aptrepo { 'buildd':
31                 ensure => absent,
32         }
33
34         $suite = $::lsbdistcodename ? {
35                 squeeze => $::lsbdistcodename,
36                 wheezy  => $::lsbdistcodename,
37                 undef   => 'squeeze',
38                 default => 'wheezy'
39         }
40
41         site::aptrepo { 'buildd.debian.org':
42                 key        => 'puppet:///modules/buildd/buildd.debian.org.asc',
43                 url        => 'https://buildd.debian.org/apt/',
44                 suite      => $suite,
45                 components => 'main',
46                 require    => Package['apt-transport-https'],
47         }
48
49         if $::hostname in [alkman,porpora,zandonai] {
50                 site::aptrepo { 'buildd.debian.org-proposed':
51                         url        => 'https://buildd.debian.org/apt/',
52                         suite      => "${suite}-proposed",
53                         components => 'main',
54                         require    => Package['apt-transport-https'],
55                 }
56         }
57
58         if $::hostname in [krenek] {
59                 site::aptrepo { 'buildd.debian.org-experimental':
60                         url        => 'https://buildd.debian.org/apt/',
61                         suite      => "${suite}-experimental",
62                         components => 'main',
63                         require    => Package['apt-transport-https'],
64                 }
65         }
66
67         # 'bad' extension
68         file { '/etc/apt/preferences.d/buildd.debian.org':
69                 ensure => absent,
70         }
71         file { '/etc/apt/preferences.d/buildd':
72                 content => template('buildd/etc/apt/preferences.d/buildd'),
73                 before  => Site::Aptrepo['buildd.debian.org']
74         }
75         file { '/etc/cron.d/dsa-buildd':
76                 source  => 'puppet:///modules/buildd/cron.d-dsa-buildd',
77                 require => Package['debian.org']
78         }
79
80         if $::lsbmajdistrelease >= 7 {
81                 package { 'python-psutil':
82                         ensure => installed,
83                 }
84                 file { '/usr/local/sbin/buildd-schroot-aptitude-kill':
85                         source  => 'puppet:///modules/buildd/buildd-schroot-aptitude-kill',
86                         mode    => '0555',
87                 }
88                 file { '/etc/cron.d/puppet-buildd-aptitude':
89                         content => "*/5 * * * * root /usr/local/sbin/buildd-schroot-aptitude-kill\n",
90                 }
91         }
92 }