3 if defined('$caller_module_name') and $caller_module_name and $caller_module_name != $module_name {
4 fail('apt::params is a private class and cannot be accessed directly')
7 if $::osfamily != 'Debian' {
8 fail('This module only works on Debian or derivatives like Ubuntu')
12 'lsbdistcodename' => defined('$lsbdistcodename') ? {
13 true => $::lsbdistcodename,
19 $provider = '/usr/bin/apt-get'
20 $sources_list = "${root}/sources.list"
21 $sources_list_d = "${root}/sources.list.d"
22 $conf_d = "${root}/apt.conf.d"
23 $preferences = "${root}/preferences"
24 $preferences_d = "${root}/preferences.d"
25 $keyserver = 'keyserver.ubuntu.com'
33 'path' => $preferences_d,
37 'path' => $sources_list_d,
44 'frequency' => 'reluctantly',
56 'sources.list' => true,
57 'sources.list.d' => true,
58 'preferences' => true,
59 'preferences.d' => true,
62 $source_key_defaults = {
63 'server' => $keyserver,
77 $distid = $::lsbdistid
78 $distcodename = $xfacts['lsbdistcodename']
81 if $::lsbdistcodename == 'debian' {
83 $distcodename = 'wheezy'
86 $distcodename = $::lsbdistcodename ? {
96 fail('Unable to determine lsbdistid, is lsb-release installed?')
99 fail("Unsupported lsbdistid (${::lsbdistid})")
107 $ppa_package = 'python-software-properties'
111 $ppa_package = 'python-software-properties'
113 'trusty', 'utopic', 'vivid': {
115 $ppa_package = 'software-properties-common'
119 $ppa_package = 'software-properties-common'