3 if $::osfamily != 'Debian' {
4 fail('This module only works on Debian or derivatives like Ubuntu')
7 # Strict variables facts lookup compatibility
9 'lsbdistcodename' => defined('$lsbdistcodename') ? {
10 true => $::lsbdistcodename,
13 'lsbdistrelease' => defined('$lsbdistrelease') ? {
14 true => $::lsbdistrelease,
17 'lsbmajdistrelease' => defined('$lsbmajdistrelease') ? {
18 true => $::lsbmajdistrelease,
21 'lsbdistdescription' => defined('$lsbdistdescription') ? {
22 true => $::lsbdistdescription,
25 'lsbminordistrelease' => defined('$lsbminordistrelease') ? {
26 true => $::lsbminordistrelease,
29 'lsbdistid' => defined('$lsbdistid') ? {
36 $provider = '/usr/bin/apt-get'
37 $sources_list = "${root}/sources.list"
38 $sources_list_d = "${root}/sources.list.d"
39 $conf_d = "${root}/apt.conf.d"
40 $preferences = "${root}/preferences"
41 $preferences_d = "${root}/preferences.d"
42 $keyserver = 'keyserver.ubuntu.com'
50 'path' => $preferences_d,
54 'path' => $sources_list_d,
60 'frequency' => 'reluctantly',
72 'sources.list' => true,
73 'sources.list.d' => true,
74 'preferences' => true,
75 'preferences.d' => true,
78 $source_key_defaults = {
79 'server' => $keyserver,
90 case $xfacts['lsbdistid'] {
92 $distid = $xfacts['lsbdistid']
93 $distcodename = $xfacts['lsbdistcodename']
96 if $xfacts['lsbdistcodename'] == 'debian' {
98 $distcodename = 'wheezy'
101 $distcodename = $xfacts['lsbdistcodename'] ? {
104 'olivia' => 'raring',
105 'nadia' => 'quantal',
110 'Cumulus Networks': {
112 $distcodename = $::lsbdistcodename
115 fail('Unable to determine lsbdistid, is lsb-release installed?')
118 fail("Unsupported lsbdistid (${::lsbdistid})")
125 $backports = {'location' => 'http://backports.debian.org/debian-backports',
126 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
127 'repos' => 'main contrib non-free',
131 $backports = {'location' => 'http://ftp.debian.org/debian/',
132 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD624692555',
133 'repos' => 'main contrib non-free',
139 $backports = {'location' => 'http://archive.ubuntu.com/ubuntu',
140 'key' => '630239CC130E1A7FD81A27B140976EAF437D05B5',
141 'repos' => 'main universe multiverse restricted',
146 $ppa_package = 'python-software-properties'
150 $ppa_package = 'python-software-properties'
152 'trusty', 'utopic', 'vivid': {
154 $ppa_package = 'software-properties-common'
158 $ppa_package = 'python-software-properties'