source: trunk/puppet/modules/debian_sources_list/manifests/init.pp @ 449

Last change on this file since 449 was 422, checked in by sebas, 15 years ago

debian sources list with extras repos virtualbox+backports+debian-multimedia

File size: 2.1 KB
Line 
1# copyright <sebas @ koumbit.org>
2# Licence: GPL
3#
4
5class debian_sources_list {
6
7   package { [ "apt", "lsb-release" ]: ensure => installed }
8
9    file { "/etc/apt/sources.list":
10        owner => "root",
11        group => "root",
12        mode => 0644,
13        content => template("debian_sources_list/sources.list.erb"),
14        require => Package["lsb-release"],
15    }
16    exec{"apt-get update debian":
17        command => "/usr/bin/apt-get update",
18        refreshonly => true,
19        subscribe => File["/etc/apt/sources.list"],
20        require => File["/etc/apt/sources.list"],
21    }
22}
23
24class debian_sources_list::virtualbox {
25
26    file { "/etc/apt/sources.list.d/virtualbox.list":
27        owner => "root",
28        group => "root",
29        mode => 0644,
30        content => template("debian_sources_list/sources.list.d/virtualbox.erb"),
31    }
32    exec{"apt-get update vb":
33        command => "/usr/bin/apt-get update",
34        refreshonly => true,
35        subscribe => File["/etc/apt/sources.list.d/virtualbox.list"],
36        require => File["/etc/apt/sources.list.d/virtualbox.list"],
37    }
38    exec{"/usr/bin/wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | /usr/bin/sudo /usr/bin/apt-key add -":
39        refreshonly => true,
40        subscribe => File["/etc/apt/sources.list.d/virtualbox.list"],
41        require => File["/etc/apt/sources.list.d/virtualbox.list"],
42    }
43}
44
45class debian_sources_list::backports {
46
47    file { "/etc/apt/sources.list.d/backports.list":
48        owner => "root",
49        group => "root",
50        mode => 0644,
51        content => template("debian_sources_list/sources.list.d/backports.erb"), 
52    }
53    exec{"apt-get update backports":
54        command => "/usr/bin/apt-get update",
55        refreshonly => true,
56        subscribe => File["/etc/apt/sources.list.d/backports.list"],
57        require => File["/etc/apt/sources.list.d/backports.list"],
58    }
59    exec{"/usr/bin/apt-get --yes -q --allow-unauthenticated install debian-backports-keyring":
60        refreshonly => true,
61        subscribe => File["/etc/apt/sources.list.d/backports.list"],
62        require => File["/etc/apt/sources.list.d/backports.list"],
63    }
64}
65
Note: See TracBrowser for help on using the repository browser.