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

Last change on this file since 766 was 667, checked in by josx@…, 15 years ago

Agregando Before para que antes de hacer apt-get update haga la instalacion de los keyrings correspondientes

File size: 2.3 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        before => Exec["apt-get update vb"],
43    }
44}
45
46class debian_sources_list::backports {
47
48    file { "/etc/apt/sources.list.d/backports.list":
49        owner => "root",
50        group => "root",
51        mode => 0644,
52        content => template("debian_sources_list/sources.list.d/backports.erb"), 
53    }
54    exec{"apt-get update backports":
55        command => "/usr/bin/apt-get update",
56        refreshonly => true,
57        subscribe => File["/etc/apt/sources.list.d/backports.list"],
58        require => File["/etc/apt/sources.list.d/backports.list"],
59    }
60    exec{ "debian-backports-keyring":
61        command => "/usr/bin/apt-get --yes -q --allow-unauthenticated install debian-backports-keyring",
62        refreshonly => true,
63        subscribe => File["/etc/apt/sources.list.d/backports.list"],
64        require => File["/etc/apt/sources.list.d/backports.list"],
65        before => Exec["apt-get update backports"],
66    }
67}
68
Note: See TracBrowser for help on using the repository browser.