Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge pull request #1 from puppet-community/daenney/remove_unattended_upgrades_remains
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
params.pp
diff --git
a/manifests/params.pp
b/manifests/params.pp
index b35bb1c8d91b0a667d2fbb3a2ae986628db86261..aa90a7dd32ef7b7f1512694a5f176c9a0d9fb75e 100644
(file)
--- a/
manifests/params.pp
+++ b/
manifests/params.pp
@@
-5,38
+5,50
@@
class apt::params {
$apt_conf_d = "${root}/apt.conf.d"
$preferences_d = "${root}/preferences.d"
$apt_conf_d = "${root}/apt.conf.d"
$preferences_d = "${root}/preferences.d"
+ if $::osfamily != 'Debian' {
+ fail('This module only works on Debian or derivatives like Ubuntu')
+ }
+
case $::lsbdistid {
case $::lsbdistid {
- 'debian': {
- case $::lsbdistcodename {
- 'squeeze': {
- $backports_location = 'http://backports.debian.org/debian-backports'
- }
- 'wheezy': {
- $backports_location = 'http://ftp.debian.org/debian/'
- }
- default: {
- $backports_location = 'http://http.debian.net/debian/'
+ 'ubuntu', 'debian': {
+ $distid = $::lsbdistid
+ $distcodename = $::lsbdistcodename
+ }
+ 'linuxmint': {
+ if $::lsbdistcodename == 'debian' {
+ $distid = 'debian'
+ $distcodename = 'wheezy'
+ } else {
+ $distid = 'ubuntu'
+ $distcodename = $::lsbdistcodename ? {
+ 'qiana' => 'trusty',
+ 'petra' => 'saucy',
+ 'olivia' => 'raring',
+ 'nadia' => 'quantal',
+ 'maya' => 'precise',
}
}
}
}
}
}
+ '': {
+ fail('Unable to determine lsbdistid, is lsb-release installed?')
+ }
+ default: {
+ fail("Unsupported lsbdistid (${::lsbdistid})")
+ }
+ }
+ case $distid {
'ubuntu': {
'ubuntu': {
- case $::lsbdistcodename {
- 'hardy','maverick','natty','oneiric','precise': {
- $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
- $ppa_options = '-y'
- }
+ case $distcodename {
'lucid': {
'lucid': {
- $backports_location = 'http://us.archive.ubuntu.com/ubuntu'
- $ppa_options = undef
+ $ppa_options = undef
+ }
+ 'precise', 'trusty', 'utopic', 'vivid': {
+ $ppa_options = '-y'
}
default: {
}
default: {
- $backports_location = 'http://old-releases.ubuntu.com/ubuntu'
- $ppa_options = '-y'
+ $ppa_options = '-y'
}
}
}
}
}
}
- default: {
- fail("Unsupported osfamily (${::osfamily}) or lsbdistid (${::lsbdistid})")
- }
}
}
}
}