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