forked from JamesAwesome/puppet-medibuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepo.pp
34 lines (29 loc) · 1016 Bytes
/
repo.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class medibuntu::repo {
apt::source {'medibuntu':
ensure => present,
location => 'http://packages.medibuntu.org/',
release => $::lsbdistcodename,
repos => $::medibuntu::nonfree ? {
false => 'free',
default => 'free non-free',
},
include_src => false,
}
# Medibuntu distributes their gpg key as a deb package.
# Because of this we will not use apt::source to
# add the repositories gpg key. That way the key will
# be updated as the repository maintainer intends.
# Lets force that to install and perform an apt-update
# to refresh our sources. We must do this using exec
# because if we tried to do so with the apt::update
# class it would cause a dependency cycle.
exec{'install_keyring':
command =>
'/usr/bin/apt-get \
install -q -y --allow-unauthenticated \
medibuntu-keyring && \
/usr/bin/apt-get -q -y update',
refreshonly => true,
}
Apt::Source['medibuntu'] ~> Exec['install_keyring']
}