2011-05-30 19:18:13 +02:00
|
|
|
class apt::params {
|
2012-02-24 23:03:51 +01:00
|
|
|
$root = '/etc/apt'
|
|
|
|
$provider = '/usr/bin/apt-get'
|
|
|
|
$sources_list_d = "${root}/sources.list.d"
|
2012-04-11 23:54:13 +02:00
|
|
|
$apt_conf_d = "${root}/apt.conf.d"
|
|
|
|
$preferences_d = "${root}/preferences.d"
|
|
|
|
|
2012-05-03 18:51:14 +02:00
|
|
|
case $::lsbdistid {
|
2014-08-29 16:23:21 +02:00
|
|
|
'ubuntu', 'debian': {
|
|
|
|
$distid = $::lsbdistid
|
|
|
|
$distcodename = $::lsbdistcodename
|
|
|
|
}
|
2014-08-29 16:57:09 +02:00
|
|
|
'linuxmint': {
|
|
|
|
if $::lsbdistcodename == 'debian' {
|
|
|
|
$distid = 'debian'
|
|
|
|
$distcodename = 'wheezy'
|
|
|
|
} else {
|
|
|
|
$distid = 'ubuntu'
|
|
|
|
$distcodename = $::lsbdistcodename ? {
|
|
|
|
'qiana' => 'trusty',
|
|
|
|
'petra' => 'saucy',
|
|
|
|
'olivia' => 'raring',
|
|
|
|
'nadia' => 'quantal',
|
|
|
|
'maya' => 'precise',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-08-29 16:23:21 +02:00
|
|
|
'': {
|
|
|
|
fail('Unable to determine lsbdistid, is lsb-release installed?')
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("Unsupported lsbdistid (${::lsbdistid})")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case $distid {
|
2012-04-11 23:54:13 +02:00
|
|
|
'debian': {
|
2014-08-29 16:23:21 +02:00
|
|
|
case $distcodename {
|
2013-05-07 14:13:59 +02:00
|
|
|
'squeeze': {
|
|
|
|
$backports_location = 'http://backports.debian.org/debian-backports'
|
2014-03-27 13:51:08 +01:00
|
|
|
$legacy_origin = true
|
2014-09-05 18:51:39 +02:00
|
|
|
$origins = ['${distro_id} oldstable', #lint:ignore:single_quote_string_with_variables
|
|
|
|
'${distro_id} ${distro_codename}-security', #lint:ignore:single_quote_string_with_variables
|
|
|
|
'${distro_id} ${distro_codename}-lts'] #lint:ignore:single_quote_string_with_variables
|
2013-05-07 14:13:59 +02:00
|
|
|
}
|
2013-08-05 13:06:54 +02:00
|
|
|
'wheezy': {
|
|
|
|
$backports_location = 'http://ftp.debian.org/debian/'
|
2014-03-27 13:51:08 +01:00
|
|
|
$legacy_origin = false
|
|
|
|
$origins = ['origin=Debian,archive=stable,label=Debian-Security']
|
2013-08-05 13:06:54 +02:00
|
|
|
}
|
2013-05-07 14:13:59 +02:00
|
|
|
default: {
|
2013-08-05 13:19:50 +02:00
|
|
|
$backports_location = 'http://http.debian.net/debian/'
|
2014-03-27 13:51:08 +01:00
|
|
|
$legacy_origin = false
|
|
|
|
$origins = ['origin=Debian,archive=stable,label=Debian-Security']
|
2013-05-07 14:13:59 +02:00
|
|
|
}
|
|
|
|
}
|
2012-04-11 23:54:13 +02:00
|
|
|
}
|
|
|
|
'ubuntu': {
|
2014-08-29 16:23:21 +02:00
|
|
|
case $distcodename {
|
2014-03-27 13:51:08 +01:00
|
|
|
'lucid': {
|
2012-04-12 02:49:30 +02:00
|
|
|
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
|
2014-03-27 13:51:08 +01:00
|
|
|
$ppa_options = undef
|
|
|
|
$legacy_origin = true
|
2014-09-05 18:51:39 +02:00
|
|
|
$origins = ['${distro_id} ${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
|
2014-02-21 01:43:48 +01:00
|
|
|
}
|
2014-03-27 13:51:08 +01:00
|
|
|
'precise', 'trusty': {
|
2014-02-21 01:43:48 +01:00
|
|
|
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
|
2014-03-27 13:51:08 +01:00
|
|
|
$ppa_options = '-y'
|
|
|
|
$legacy_origin = true
|
2014-09-05 18:51:39 +02:00
|
|
|
$origins = ['${distro_id}:${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
|
2012-04-11 23:54:13 +02:00
|
|
|
}
|
|
|
|
default: {
|
2012-04-12 02:49:30 +02:00
|
|
|
$backports_location = 'http://old-releases.ubuntu.com/ubuntu'
|
2014-03-27 13:51:08 +01:00
|
|
|
$ppa_options = '-y'
|
|
|
|
$legacy_origin = true
|
2014-09-05 18:51:39 +02:00
|
|
|
$origins = ['${distro_id}:${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
|
2012-04-11 23:54:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-05-30 19:18:13 +02:00
|
|
|
}
|