(FM-7316) - i18n Process implemented and .pot file generated
[puppet-modules/puppetlabs-apt.git] / manifests / params.pp
1 # Setting params for the module
2 class apt::params {
3
4   if $::osfamily != 'Debian' {
5     fail(translate('This module only works on Debian or derivatives like Ubuntu'))
6   }
7
8   $root           = '/etc/apt'
9   $provider       = '/usr/bin/apt-get'
10   $sources_list   = "${root}/sources.list"
11   $sources_list_d = "${root}/sources.list.d"
12   $trusted_gpg_d  = "${root}/trusted.gpg.d"
13   $conf_d         = "${root}/apt.conf.d"
14   $preferences    = "${root}/preferences"
15   $preferences_d  = "${root}/preferences.d"
16   $keyserver      = 'keyserver.ubuntu.com'
17   $confs          = {}
18   $update         = {}
19   $purge          = {}
20   $proxy          = {}
21   $sources        = {}
22   $keys           = {}
23   $ppas           = {}
24   $pins           = {}
25   $settings       = {}
26   $auth_conf_entries = []
27
28   $config_files = {
29     'conf'   => {
30       'path' => $conf_d,
31       'ext'  => '',
32     },
33     'pref'   => {
34       'path' => $preferences_d,
35       'ext'  => '.pref',
36     },
37     'list'   => {
38       'path' => $sources_list_d,
39       'ext'  => '.list',
40     }
41   }
42
43   $update_defaults = {
44     'frequency' => 'reluctantly',
45     'loglevel'  => undef,
46     'timeout'   => undef,
47     'tries'     => undef,
48   }
49
50   $proxy_defaults = {
51     'ensure' => undef,
52     'host'   => undef,
53     'port'   => 8080,
54     'https'  => false,
55     'direct' => false,
56   }
57
58   $purge_defaults = {
59     'sources.list'   => false,
60     'sources.list.d' => false,
61     'preferences'    => false,
62     'preferences.d'  => false,
63   }
64
65   $source_key_defaults = {
66     'server'  => $keyserver,
67     'options' => undef,
68     'content' => undef,
69     'source'  => undef,
70   }
71
72   $include_defaults = {
73     'deb' => true,
74     'src' => false,
75   }
76
77   case $facts['os']['name']{
78     'Debian': {
79           $backports = {
80             'location' => 'http://deb.debian.org/debian',
81             'key'      => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
82             'repos'    => 'main contrib non-free',
83           }
84       $ppa_options = undef
85       $ppa_package = undef
86     }
87     'Ubuntu': {
88       $backports = {
89         'location' => 'http://archive.ubuntu.com/ubuntu',
90         'key'      => '630239CC130E1A7FD81A27B140976EAF437D05B5',
91         'repos'    => 'main universe multiverse restricted',
92       }
93       $ppa_options        = '-y'
94       $ppa_package        = 'software-properties-common'
95     }
96     undef: {
97       fail(translate('Unable to determine value for fact os[\"name\"]'))
98     }
99     default: {
100       $ppa_options = undef
101       $ppa_package = undef
102       $backports   = undef
103     }
104   }
105 }