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' => false,
73 'sources.list.d' => false,
74 'preferences' => false,
75 'preferences.d' => false,
78 $source_key_defaults = {
79 'server' => $keyserver,
90 case $xfacts['lsbdistid'] {
92 case $xfacts['lsbdistcodename'] {
95 'location' => 'http://backports.debian.org/debian-backports',
96 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
97 'repos' => 'main contrib non-free',
102 'location' => 'http://ftp.debian.org/debian/',
103 'key' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
104 'repos' => 'main contrib non-free',
111 'location' => 'http://archive.ubuntu.com/ubuntu',
112 'key' => '630239CC130E1A7FD81A27B140976EAF437D05B5',
113 'repos' => 'main universe multiverse restricted',
116 case $xfacts['lsbdistcodename'] {
119 $ppa_package = 'python-software-properties'
123 $ppa_package = 'python-software-properties'
125 'trusty', 'utopic', 'vivid': {
127 $ppa_package = 'software-properties-common'
131 $ppa_package = 'python-software-properties'
136 fail('Unable to determine lsbdistid, is lsb-release installed?')