"This change pins the puppetlabs-puppet_agent module to v4.12.1. Previosuly the fixut...
[puppet-modules/puppetlabs-apt.git] / REFERENCE.md
1 # Reference
2
3 <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
4
5 ## Table of Contents
6
7 ### Classes
8
9 #### Public Classes
10
11 * [`apt`](#apt): Main class, includes all other classes.
12 * [`apt::backports`](#apt--backports): Manages backports.
13
14 #### Private Classes
15
16 * `apt::params`: Provides defaults for the Apt module parameters.
17 * `apt::update`: Updates the list of available packages using apt-get update.
18
19 ### Defined types
20
21 * [`apt::conf`](#apt--conf): Specifies a custom Apt configuration file.
22 * [`apt::key`](#apt--key): Manages the GPG keys that Apt uses to authenticate packages.
23 * [`apt::mark`](#apt--mark): Manages apt-mark settings
24 * [`apt::pin`](#apt--pin): Manages Apt pins. Does not trigger an apt-get update run.
25 * [`apt::ppa`](#apt--ppa): Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
26 * [`apt::setting`](#apt--setting): Manages Apt configuration files.
27 * [`apt::source`](#apt--source): Manages the Apt sources in /etc/apt/sources.list.d/.
28
29 ### Resource types
30
31 #### Private Resource types
32
33 * `apt_key`: This type provides Puppet with the capabilities to manage GPG keys needed
34 by apt to perform package validation. Apt has it's own GPG keyring that can
35 be manipulated through the `apt-key` command.
36
37 ### Data types
38
39 * [`Apt::Auth_conf_entry`](#Apt--Auth_conf_entry): Login configuration settings that are recorded in the file `/etc/apt/auth.conf`.
40 * [`Apt::Proxy`](#Apt--Proxy): Configures Apt to connect to a proxy server.
41 * [`Apt::Proxy_Per_Host`](#Apt--Proxy_Per_Host): Adds per-host overrides to the system default APT proxy configuration
42
43 ### Tasks
44
45 * [`init`](#init): Allows you to perform apt-get functions
46
47 ## Classes
48
49 ### <a name="apt"></a>`apt`
50
51 Main class, includes all other classes.
52
53 * **See also**
54   * https://docs.puppetlabs.com/references/latest/function.html#createresources
55     * for the create resource function
56
57 #### Parameters
58
59 The following parameters are available in the `apt` class:
60
61 * [`provider`](#-apt--provider)
62 * [`keyserver`](#-apt--keyserver)
63 * [`key_options`](#-apt--key_options)
64 * [`ppa_options`](#-apt--ppa_options)
65 * [`ppa_package`](#-apt--ppa_package)
66 * [`backports`](#-apt--backports)
67 * [`confs`](#-apt--confs)
68 * [`update`](#-apt--update)
69 * [`update_defaults`](#-apt--update_defaults)
70 * [`purge`](#-apt--purge)
71 * [`purge_defaults`](#-apt--purge_defaults)
72 * [`proxy`](#-apt--proxy)
73 * [`proxy_defaults`](#-apt--proxy_defaults)
74 * [`sources`](#-apt--sources)
75 * [`keys`](#-apt--keys)
76 * [`ppas`](#-apt--ppas)
77 * [`pins`](#-apt--pins)
78 * [`settings`](#-apt--settings)
79 * [`manage_auth_conf`](#-apt--manage_auth_conf)
80 * [`auth_conf_entries`](#-apt--auth_conf_entries)
81 * [`auth_conf_owner`](#-apt--auth_conf_owner)
82 * [`root`](#-apt--root)
83 * [`sources_list`](#-apt--sources_list)
84 * [`sources_list_d`](#-apt--sources_list_d)
85 * [`conf_d`](#-apt--conf_d)
86 * [`preferences`](#-apt--preferences)
87 * [`preferences_d`](#-apt--preferences_d)
88 * [`config_files`](#-apt--config_files)
89 * [`sources_list_force`](#-apt--sources_list_force)
90 * [`include_defaults`](#-apt--include_defaults)
91 * [`apt_conf_d`](#-apt--apt_conf_d)
92 * [`source_key_defaults`](#-apt--source_key_defaults)
93
94 ##### <a name="-apt--provider"></a>`provider`
95
96 Data type: `String`
97
98 Specifies the provider that should be used by apt::update.
99
100 Default value: `$apt::params::provider`
101
102 ##### <a name="-apt--keyserver"></a>`keyserver`
103
104 Data type: `String`
105
106 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
107 hkp://).
108
109 Default value: `$apt::params::keyserver`
110
111 ##### <a name="-apt--key_options"></a>`key_options`
112
113 Data type: `Optional[String]`
114
115 Specifies the default options for apt::key resources.
116
117 Default value: `$apt::params::key_options`
118
119 ##### <a name="-apt--ppa_options"></a>`ppa_options`
120
121 Data type: `Optional[Array[String]]`
122
123 Supplies options to be passed to the `add-apt-repository` command.
124
125 Default value: `$apt::params::ppa_options`
126
127 ##### <a name="-apt--ppa_package"></a>`ppa_package`
128
129 Data type: `Optional[String]`
130
131 Names the package that provides the `apt-add-repository` command.
132
133 Default value: `$apt::params::ppa_package`
134
135 ##### <a name="-apt--backports"></a>`backports`
136
137 Data type: `Optional[Hash]`
138
139 Specifies some of the default parameters used by apt::backports. Valid options: a hash made up from the following keys:
140
141 Options:
142
143 * **:location** `String`: See apt::backports for documentation.
144 * **:repos** `String`: See apt::backports for documentation.
145 * **:key** `String`: See apt::backports for documentation.
146
147 Default value: `$apt::params::backports`
148
149 ##### <a name="-apt--confs"></a>`confs`
150
151 Data type: `Hash`
152
153 Creates new `apt::conf` resources. Valid options: a hash to be passed to the create_resources function linked above.
154
155 Default value: `$apt::params::confs`
156
157 ##### <a name="-apt--update"></a>`update`
158
159 Data type: `Hash`
160
161 Configures various update settings. Valid options: a hash made up from the following keys:
162
163 Options:
164
165 * **:frequency** `String`: Specifies how often to run `apt-get update`. If the exec resource `apt_update` is notified,
166 `apt-get update` runs regardless of this value.
167 Valid options:
168   'always' (at every Puppet run);
169    daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400);
170   'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800);
171   'reluctantly' (only if the exec resource `apt_update` is notified).
172 Default: 'reluctantly'.
173 * **:loglevel** `Integer`: Specifies the log level of logs outputted to the console. Default: undef.
174 * **:timeout** `Integer`: Specifies how long to wait for the update to complete before canceling it. Valid options: an integer, in seconds. Default: undef.
175 * **:tries** `Integer`: Specifies how many times to retry the update after receiving a DNS or HTTP error. Default: undef.
176
177 Default value: `$apt::params::update`
178
179 ##### <a name="-apt--update_defaults"></a>`update_defaults`
180
181 Data type: `Hash`
182
183 The default update settings that are combined and merged with the passed `update` value
184
185 Default value: `$apt::params::update_defaults`
186
187 ##### <a name="-apt--purge"></a>`purge`
188
189 Data type: `Hash`
190
191 Specifies whether to purge any existing settings that aren't managed by Puppet. Valid options: a hash made up from the following keys:
192
193 Options:
194
195 * **:sources.list** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list. Default false.
196 * **:sources.list.d** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list.d. Default false.
197 * **:preferences** `Boolean`: Specifies whether to purge any unmanaged entries from preferences. Default false.
198 * **:preferences.d.** `Boolean`: Specifies whether to purge any unmanaged entries from preferences.d. Default false.
199
200 Default value: `$apt::params::purge`
201
202 ##### <a name="-apt--purge_defaults"></a>`purge_defaults`
203
204 Data type: `Hash`
205
206 The default purge settings that are combined and merged with the passed `purge` value
207
208 Default value: `$apt::params::purge_defaults`
209
210 ##### <a name="-apt--proxy"></a>`proxy`
211
212 Data type: `Apt::Proxy`
213
214 Configures Apt to connect to a proxy server. Valid options: a hash matching the locally defined type apt::proxy.
215
216 Default value: `$apt::params::proxy`
217
218 ##### <a name="-apt--proxy_defaults"></a>`proxy_defaults`
219
220 Data type: `Hash`
221
222 The default proxy settings that are combined and merged with the passed `proxy` value
223
224 Default value: `$apt::params::proxy_defaults`
225
226 ##### <a name="-apt--sources"></a>`sources`
227
228 Data type: `Hash`
229
230 Creates new `apt::source` resources. Valid options: a hash to be passed to the create_resources function linked above.
231
232 Default value: `$apt::params::sources`
233
234 ##### <a name="-apt--keys"></a>`keys`
235
236 Data type: `Hash`
237
238 Creates new `apt::key` resources. Valid options: a hash to be passed to the create_resources function linked above.
239
240 Default value: `$apt::params::keys`
241
242 ##### <a name="-apt--ppas"></a>`ppas`
243
244 Data type: `Hash`
245
246 Creates new `apt::ppa` resources. Valid options: a hash to be passed to the create_resources function linked above.
247
248 Default value: `$apt::params::ppas`
249
250 ##### <a name="-apt--pins"></a>`pins`
251
252 Data type: `Hash`
253
254 Creates new `apt::pin` resources. Valid options: a hash to be passed to the create_resources function linked above.
255
256 Default value: `$apt::params::pins`
257
258 ##### <a name="-apt--settings"></a>`settings`
259
260 Data type: `Hash`
261
262 Creates new `apt::setting` resources. Valid options: a hash to be passed to the create_resources function linked above.
263
264 Default value: `$apt::params::settings`
265
266 ##### <a name="-apt--manage_auth_conf"></a>`manage_auth_conf`
267
268 Data type: `Boolean`
269
270 Specifies whether to manage the /etc/apt/auth.conf file. When true, the file will be overwritten with the entries specified in
271 the auth_conf_entries parameter. When false, the file will be ignored (note that this does not set the file to absent.
272
273 Default value: `$apt::params::manage_auth_conf`
274
275 ##### <a name="-apt--auth_conf_entries"></a>`auth_conf_entries`
276
277 Data type: `Array[Apt::Auth_conf_entry]`
278
279 An optional array of login configuration settings (hashes) that are recorded in the file /etc/apt/auth.conf. This file has a netrc-like
280 format (similar to what curl uses) and contains the login configuration for APT sources and proxies that require authentication. See
281 https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html for details. If specified each hash must contain the keys machine, login and
282 password and no others. Specifying manage_auth_conf and not specifying this parameter will set /etc/apt/auth.conf to absent.
283
284 Default value: `$apt::params::auth_conf_entries`
285
286 ##### <a name="-apt--auth_conf_owner"></a>`auth_conf_owner`
287
288 Data type: `String`
289
290 The owner of the file /etc/apt/auth.conf. Default: '_apt' or 'root' on old releases.
291
292 Default value: `$apt::params::auth_conf_owner`
293
294 ##### <a name="-apt--root"></a>`root`
295
296 Data type: `String`
297
298 Specifies root directory of Apt executable.
299
300 Default value: `$apt::params::root`
301
302 ##### <a name="-apt--sources_list"></a>`sources_list`
303
304 Data type: `String`
305
306 Specifies the path of the sources_list file to use.
307
308 Default value: `$apt::params::sources_list`
309
310 ##### <a name="-apt--sources_list_d"></a>`sources_list_d`
311
312 Data type: `String`
313
314 Specifies the path of the sources_list.d file to use.
315
316 Default value: `$apt::params::sources_list_d`
317
318 ##### <a name="-apt--conf_d"></a>`conf_d`
319
320 Data type: `String`
321
322 Specifies the path of the conf.d file to use.
323
324 Default value: `$apt::params::conf_d`
325
326 ##### <a name="-apt--preferences"></a>`preferences`
327
328 Data type: `String`
329
330 Specifies the path of the preferences file to use.
331
332 Default value: `$apt::params::preferences`
333
334 ##### <a name="-apt--preferences_d"></a>`preferences_d`
335
336 Data type: `String`
337
338 Specifies the path of the preferences.d file to use.
339
340 Default value: `$apt::params::preferences_d`
341
342 ##### <a name="-apt--config_files"></a>`config_files`
343
344 Data type: `Hash`
345
346 A hash made up of the various configuration files used by Apt.
347
348 Default value: `$apt::params::config_files`
349
350 ##### <a name="-apt--sources_list_force"></a>`sources_list_force`
351
352 Data type: `Boolean`
353
354 Specifies whether to perform force purge or delete. Default false.
355
356 Default value: `$apt::params::sources_list_force`
357
358 ##### <a name="-apt--include_defaults"></a>`include_defaults`
359
360 Data type: `Hash`
361
362
363
364 Default value: `$apt::params::include_defaults`
365
366 ##### <a name="-apt--apt_conf_d"></a>`apt_conf_d`
367
368 Data type: `String`
369
370 The path to the file `apt.conf.d`
371
372 Default value: `$apt::params::apt_conf_d`
373
374 ##### <a name="-apt--source_key_defaults"></a>`source_key_defaults`
375
376 Data type: `Hash`
377
378 The fault `source_key` settings
379
380 Default value:
381
382 ```puppet
383 {
384     'server'  => $keyserver,
385     'options' => undef,
386     'content' => undef,
387     'source'  => undef,
388   }
389 ```
390
391 ### <a name="apt--backports"></a>`apt::backports`
392
393 Manages backports.
394
395 #### Examples
396
397 ##### Set up a backport source for Linux Mint qiana
398
399 ```puppet
400 class { 'apt::backports':
401   location => 'http://us.archive.ubuntu.com/ubuntu',
402   release  => 'trusty-backports',
403   repos    => 'main universe multiverse restricted',
404   key      => {
405     id     => '630239CC130E1A7FD81A27B140976EAF437D05B5',
406     server => 'keyserver.ubuntu.com',
407   },
408 }
409 ```
410
411 #### Parameters
412
413 The following parameters are available in the `apt::backports` class:
414
415 * [`location`](#-apt--backports--location)
416 * [`release`](#-apt--backports--release)
417 * [`repos`](#-apt--backports--repos)
418 * [`key`](#-apt--backports--key)
419 * [`pin`](#-apt--backports--pin)
420 * [`include`](#-apt--backports--include)
421
422 ##### <a name="-apt--backports--location"></a>`location`
423
424 Data type: `Optional[String]`
425
426 Specifies an Apt repository containing the backports to manage. Valid options: a string containing a URL. Default value for Debian and
427 Ubuntu varies:
428
429 - Debian: 'http://deb.debian.org/debian'
430
431 - Ubuntu: 'http://archive.ubuntu.com/ubuntu'
432
433 Default value: `undef`
434
435 ##### <a name="-apt--backports--release"></a>`release`
436
437 Data type: `Optional[String]`
438
439 Specifies a distribution of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
440 Default: on Debian and Ubuntu, `${fact('os.distro.codename')}-backports`. We recommend keeping this default, except on other operating
441 systems.
442
443 Default value: `undef`
444
445 ##### <a name="-apt--backports--repos"></a>`repos`
446
447 Data type: `Optional[String]`
448
449 Specifies a component of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
450 Default value for Debian and Ubuntu varies:
451
452 - Debian: 'main contrib non-free'
453
454 - Ubuntu: 'main universe multiverse restricted'
455
456 Default value: `undef`
457
458 ##### <a name="-apt--backports--key"></a>`key`
459
460 Data type: `Optional[Variant[String, Hash]]`
461
462 Specifies a key to authenticate the backports. Valid options: a string to be passed to the id parameter of the apt::key defined type, or a
463 hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
464 for Debian and Ubuntu varies:
465
466 - Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
467
468 - Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
469
470 Default value: `undef`
471
472 ##### <a name="-apt--backports--pin"></a>`pin`
473
474 Data type: `Variant[Integer, String, Hash]`
475
476 Specifies a pin priority for the backports. Valid options: a number or string to be passed to the `id` parameter of the `apt::pin` defined
477 type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
478
479 Default value: `200`
480
481 ##### <a name="-apt--backports--include"></a>`include`
482
483 Data type: `Variant[Hash]`
484
485 Specifies whether to include 'deb' or 'src', or both.
486
487 Default value: `{}`
488
489 ## Defined types
490
491 ### <a name="apt--conf"></a>`apt::conf`
492
493 Specifies a custom Apt configuration file.
494
495 #### Parameters
496
497 The following parameters are available in the `apt::conf` defined type:
498
499 * [`content`](#-apt--conf--content)
500 * [`ensure`](#-apt--conf--ensure)
501 * [`priority`](#-apt--conf--priority)
502 * [`notify_update`](#-apt--conf--notify_update)
503
504 ##### <a name="-apt--conf--content"></a>`content`
505
506 Data type: `Optional[String]`
507
508 Required unless `ensure` is set to 'absent'. Directly supplies content for the configuration file.
509
510 Default value: `undef`
511
512 ##### <a name="-apt--conf--ensure"></a>`ensure`
513
514 Data type: `Enum['present', 'absent']`
515
516 Specifies whether the configuration file should exist. Valid options: 'present' and 'absent'.
517
518 Default value: `present`
519
520 ##### <a name="-apt--conf--priority"></a>`priority`
521
522 Data type: `Variant[String, Integer]`
523
524 Determines the order in which Apt processes the configuration file. Files with lower priority numbers are loaded first.
525 Valid options: a string containing an integer or an integer.
526
527 Default value: `50`
528
529 ##### <a name="-apt--conf--notify_update"></a>`notify_update`
530
531 Data type: `Optional[Boolean]`
532
533 Specifies whether to trigger an `apt-get update` run.
534
535 Default value: `undef`
536
537 ### <a name="apt--key"></a>`apt::key`
538
539 Manages the GPG keys that Apt uses to authenticate packages.
540
541 * **Note** The apt::key defined type makes use of the apt_key type, but includes extra functionality to help prevent duplicate keys.
542
543 #### Examples
544
545 ##### Declare Apt key for apt.puppetlabs.com source
546
547 ```puppet
548 apt::key { 'puppetlabs':
549   id      => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
550   server  => 'keyserver.ubuntu.com',
551   options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
552 }
553 ```
554
555 #### Parameters
556
557 The following parameters are available in the `apt::key` defined type:
558
559 * [`id`](#-apt--key--id)
560 * [`ensure`](#-apt--key--ensure)
561 * [`content`](#-apt--key--content)
562 * [`source`](#-apt--key--source)
563 * [`server`](#-apt--key--server)
564 * [`weak_ssl`](#-apt--key--weak_ssl)
565 * [`options`](#-apt--key--options)
566
567 ##### <a name="-apt--key--id"></a>`id`
568
569 Data type: `Pattern[/\A(0x)?[0-9a-fA-F]{8}\Z/, /\A(0x)?[0-9a-fA-F]{16}\Z/, /\A(0x)?[0-9a-fA-F]{40}\Z/]`
570
571 Specifies a GPG key to authenticate Apt package signatures. Valid options: a string containing a key ID (8 or 16 hexadecimal
572 characters, optionally prefixed with "0x") or a full key fingerprint (40 hexadecimal characters).
573
574 Default value: `$title`
575
576 ##### <a name="-apt--key--ensure"></a>`ensure`
577
578 Data type: `Enum['present', 'absent', 'refreshed']`
579
580 Specifies whether the key should exist. Valid options: 'present', 'absent' or 'refreshed'. Using 'refreshed' will make keys auto
581 update when they have expired (assuming a new key exists on the key server).
582
583 Default value: `present`
584
585 ##### <a name="-apt--key--content"></a>`content`
586
587 Data type: `Optional[String]`
588
589 Supplies the entire GPG key. Useful in case the key can't be fetched from a remote location and using a file resource is inconvenient.
590
591 Default value: `undef`
592
593 ##### <a name="-apt--key--source"></a>`source`
594
595 Data type: `Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]]`
596
597 Specifies the location of an existing GPG key file to copy. Valid options: a string containing a URL (ftp://, http://, or https://) or
598 an absolute path.
599
600 Default value: `undef`
601
602 ##### <a name="-apt--key--server"></a>`server`
603
604 Data type: `Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$/]`
605
606 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://,
607 hkp:// or hkps://). The hkps:// protocol is currently only supported on Ubuntu 18.04.
608
609 Default value: `$apt::keyserver`
610
611 ##### <a name="-apt--key--weak_ssl"></a>`weak_ssl`
612
613 Data type: `Boolean`
614
615 Specifies whether strict SSL verification on a https URL should be disabled. Valid options: true or false.
616
617 Default value: `false`
618
619 ##### <a name="-apt--key--options"></a>`options`
620
621 Data type: `Optional[String]`
622
623 Passes additional options to `apt-key adv --keyserver-options`.
624
625 Default value: `$apt::key_options`
626
627 ### <a name="apt--mark"></a>`apt::mark`
628
629 Manages apt-mark settings
630
631 #### Parameters
632
633 The following parameters are available in the `apt::mark` defined type:
634
635 * [`setting`](#-apt--mark--setting)
636
637 ##### <a name="-apt--mark--setting"></a>`setting`
638
639 Data type: `Enum['auto','manual','hold','unhold']`
640
641 auto, manual, hold, unhold
642 specifies the behavior of apt in case of no more dependencies installed
643 https://manpages.debian.org/stable/apt/apt-mark.8.en.html
644
645 ### <a name="apt--pin"></a>`apt::pin`
646
647 Manages Apt pins. Does not trigger an apt-get update run.
648
649 * **See also**
650   * http://linux.die.net/man/5/apt_preferences
651     * for context on these parameters
652
653 #### Parameters
654
655 The following parameters are available in the `apt::pin` defined type:
656
657 * [`ensure`](#-apt--pin--ensure)
658 * [`explanation`](#-apt--pin--explanation)
659 * [`order`](#-apt--pin--order)
660 * [`packages`](#-apt--pin--packages)
661 * [`priority`](#-apt--pin--priority)
662 * [`release`](#-apt--pin--release)
663 * [`release_version`](#-apt--pin--release_version)
664 * [`component`](#-apt--pin--component)
665 * [`originator`](#-apt--pin--originator)
666 * [`label`](#-apt--pin--label)
667 * [`origin`](#-apt--pin--origin)
668 * [`version`](#-apt--pin--version)
669 * [`codename`](#-apt--pin--codename)
670
671 ##### <a name="-apt--pin--ensure"></a>`ensure`
672
673 Data type: `Enum['file', 'present', 'absent']`
674
675 Specifies whether the pin should exist. Valid options: 'file', 'present', and 'absent'.
676
677 Default value: `present`
678
679 ##### <a name="-apt--pin--explanation"></a>`explanation`
680
681 Data type: `Optional[String]`
682
683 Supplies a comment to explain the pin. Default: "${caller_module_name}: ${name}".
684
685 Default value: `undef`
686
687 ##### <a name="-apt--pin--order"></a>`order`
688
689 Data type: `Variant[Integer]`
690
691 Determines the order in which Apt processes the pin file. Files with lower order numbers are loaded first.
692
693 Default value: `50`
694
695 ##### <a name="-apt--pin--packages"></a>`packages`
696
697 Data type: `Variant[String, Array]`
698
699 Specifies which package(s) to pin.
700
701 Default value: `'*'`
702
703 ##### <a name="-apt--pin--priority"></a>`priority`
704
705 Data type: `Variant[Numeric, String]`
706
707 Sets the priority of the package. If multiple versions of a given package are available, `apt-get` installs the one with the highest
708 priority number (subject to dependency constraints). Valid options: an integer.
709
710 Default value: `0`
711
712 ##### <a name="-apt--pin--release"></a>`release`
713
714 Data type: `Optional[String]`
715
716 Tells APT to prefer packages that support the specified release. Typical values include 'stable', 'testing', and 'unstable'.
717
718 Default value: `undef`
719
720 ##### <a name="-apt--pin--release_version"></a>`release_version`
721
722 Data type: `Optional[String]`
723
724 Tells APT to prefer packages that support the specified operating system release version (such as Debian release version 7).
725
726 Default value: `undef`
727
728 ##### <a name="-apt--pin--component"></a>`component`
729
730 Data type: `Optional[String]`
731
732 Names the licensing component associated with the packages in the directory tree of the Release file.
733
734 Default value: `undef`
735
736 ##### <a name="-apt--pin--originator"></a>`originator`
737
738 Data type: `Optional[String]`
739
740 Names the originator of the packages in the directory tree of the Release file.
741
742 Default value: `undef`
743
744 ##### <a name="-apt--pin--label"></a>`label`
745
746 Data type: `Optional[String]`
747
748 Names the label of the packages in the directory tree of the Release file.
749
750 Default value: `undef`
751
752 ##### <a name="-apt--pin--origin"></a>`origin`
753
754 Data type: `Optional[String]`
755
756 The package origin
757
758 Default value: `undef`
759
760 ##### <a name="-apt--pin--version"></a>`version`
761
762 Data type: `Optional[String]`
763
764 The version of the package
765
766 Default value: `undef`
767
768 ##### <a name="-apt--pin--codename"></a>`codename`
769
770 Data type: `Optional[String]`
771
772 The codename of the package
773
774 Default value: `undef`
775
776 ### <a name="apt--ppa"></a>`apt::ppa`
777
778 Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
779
780 #### Examples
781
782 ##### Example declaration of an Apt PPA
783
784 ```puppet
785 apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': }
786 ```
787
788 #### Parameters
789
790 The following parameters are available in the `apt::ppa` defined type:
791
792 * [`ensure`](#-apt--ppa--ensure)
793 * [`options`](#-apt--ppa--options)
794 * [`release`](#-apt--ppa--release)
795 * [`dist`](#-apt--ppa--dist)
796 * [`package_name`](#-apt--ppa--package_name)
797 * [`package_manage`](#-apt--ppa--package_manage)
798
799 ##### <a name="-apt--ppa--ensure"></a>`ensure`
800
801 Data type: `String`
802
803 Specifies whether the PPA should exist. Valid options: 'present' and 'absent'.
804
805 Default value: `'present'`
806
807 ##### <a name="-apt--ppa--options"></a>`options`
808
809 Data type: `Optional[Array[String]]`
810
811 Supplies options to be passed to the `add-apt-repository` command. Default: '-y'.
812
813 Default value: `$apt::ppa_options`
814
815 ##### <a name="-apt--ppa--release"></a>`release`
816
817 Data type: `Optional[String]`
818
819 Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename.
820 Optional if `puppet facts show os.distro.codename` returns your correct distribution release codename.
821
822 Default value: `fact('os.distro.codename')`
823
824 ##### <a name="-apt--ppa--dist"></a>`dist`
825
826 Data type: `Optional[String]`
827
828 Specifies the distribution of your node. Valid options: a string containing a valid distribution codename.
829 Optional if `puppet facts show os.name` returns your correct distribution name.
830
831 Default value: `$facts['os']['name']`
832
833 ##### <a name="-apt--ppa--package_name"></a>`package_name`
834
835 Data type: `Optional[String]`
836
837 Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'.
838
839 Default value: `$apt::ppa_package`
840
841 ##### <a name="-apt--ppa--package_manage"></a>`package_manage`
842
843 Data type: `Boolean`
844
845 Specifies whether Puppet should manage the package that provides `apt-add-repository`.
846
847 Default value: `false`
848
849 ### <a name="apt--setting"></a>`apt::setting`
850
851 Manages Apt configuration files.
852
853 * **See also**
854   * https://docs.puppetlabs.com/references/latest/type.html#file-attributes
855     * for more information on source and content parameters
856
857 #### Parameters
858
859 The following parameters are available in the `apt::setting` defined type:
860
861 * [`priority`](#-apt--setting--priority)
862 * [`ensure`](#-apt--setting--ensure)
863 * [`source`](#-apt--setting--source)
864 * [`content`](#-apt--setting--content)
865 * [`notify_update`](#-apt--setting--notify_update)
866
867 ##### <a name="-apt--setting--priority"></a>`priority`
868
869 Data type: `Variant[String, Integer, Array]`
870
871 Determines the order in which Apt processes the configuration file. Files with higher priority numbers are loaded first.
872
873 Default value: `50`
874
875 ##### <a name="-apt--setting--ensure"></a>`ensure`
876
877 Data type: `Enum['file', 'present', 'absent']`
878
879 Specifies whether the file should exist. Valid options: 'present', 'absent', and 'file'.
880
881 Default value: `file`
882
883 ##### <a name="-apt--setting--source"></a>`source`
884
885 Data type: `Optional[String]`
886
887 Required, unless `content` is set. Specifies a source file to supply the content of the configuration file. Cannot be used in combination
888 with `content`. Valid options: see link above for Puppet's native file type source attribute.
889
890 Default value: `undef`
891
892 ##### <a name="-apt--setting--content"></a>`content`
893
894 Data type: `Optional[String]`
895
896 Required, unless `source` is set. Directly supplies content for the configuration file. Cannot be used in combination with `source`. Valid
897 options: see link above for Puppet's native file type content attribute.
898
899 Default value: `undef`
900
901 ##### <a name="-apt--setting--notify_update"></a>`notify_update`
902
903 Data type: `Boolean`
904
905 Specifies whether to trigger an `apt-get update` run.
906
907 Default value: `true`
908
909 ### <a name="apt--source"></a>`apt::source`
910
911 Manages the Apt sources in /etc/apt/sources.list.d/.
912
913 #### Examples
914
915 ##### Install the puppetlabs apt source
916
917 ```puppet
918 apt::source { 'puppetlabs':
919   location => 'http://apt.puppetlabs.com',
920   repos    => 'main',
921   key      => {
922     id     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
923     server => 'keyserver.ubuntu.com',
924   },
925 }
926 ```
927
928 #### Parameters
929
930 The following parameters are available in the `apt::source` defined type:
931
932 * [`location`](#-apt--source--location)
933 * [`comment`](#-apt--source--comment)
934 * [`ensure`](#-apt--source--ensure)
935 * [`release`](#-apt--source--release)
936 * [`repos`](#-apt--source--repos)
937 * [`include`](#-apt--source--include)
938 * [`key`](#-apt--source--key)
939 * [`keyring`](#-apt--source--keyring)
940 * [`pin`](#-apt--source--pin)
941 * [`architecture`](#-apt--source--architecture)
942 * [`allow_unsigned`](#-apt--source--allow_unsigned)
943 * [`allow_insecure`](#-apt--source--allow_insecure)
944 * [`notify_update`](#-apt--source--notify_update)
945 * [`check_valid_until`](#-apt--source--check_valid_until)
946
947 ##### <a name="-apt--source--location"></a>`location`
948
949 Data type: `Optional[String]`
950
951 Required, unless ensure is set to 'absent'. Specifies an Apt repository. Valid options: a string containing a repository URL.
952
953 Default value: `undef`
954
955 ##### <a name="-apt--source--comment"></a>`comment`
956
957 Data type: `String`
958
959 Supplies a comment for adding to the Apt source file.
960
961 Default value: `$name`
962
963 ##### <a name="-apt--source--ensure"></a>`ensure`
964
965 Data type: `String`
966
967 Specifies whether the Apt source file should exist. Valid options: 'present' and 'absent'.
968
969 Default value: `present`
970
971 ##### <a name="-apt--source--release"></a>`release`
972
973 Data type: `Optional[String]`
974
975 Specifies a distribution of the Apt repository.
976
977 Default value: `undef`
978
979 ##### <a name="-apt--source--repos"></a>`repos`
980
981 Data type: `String`
982
983 Specifies a component of the Apt repository.
984
985 Default value: `'main'`
986
987 ##### <a name="-apt--source--include"></a>`include`
988
989 Data type: `Variant[Hash]`
990
991 Configures include options. Valid options: a hash of available keys.
992
993 Options:
994
995 * **:deb** `Boolean`: Specifies whether to request the distribution's compiled binaries. Default true.
996 * **:src** `Boolean`: Specifies whether to request the distribution's uncompiled source code. Default false.
997
998 Default value: `{}`
999
1000 ##### <a name="-apt--source--key"></a>`key`
1001
1002 Data type: `Optional[Variant[String, Hash]]`
1003
1004 Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key`
1005 defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, `weak_ssl`,
1006 and/or `options` parameters.
1007
1008 Default value: `undef`
1009
1010 ##### <a name="-apt--source--keyring"></a>`keyring`
1011
1012 Data type: `Optional[Stdlib::AbsolutePath]`
1013
1014 Absolute path to a file containing the PGP keyring used to sign this repository. Value is used to set signed-by on the source entry.
1015 See https://wiki.debian.org/DebianRepository/UseThirdParty for details.
1016
1017 Default value: `undef`
1018
1019 ##### <a name="-apt--source--pin"></a>`pin`
1020
1021 Data type: `Optional[Variant[Hash, Numeric, String]]`
1022
1023 Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the
1024 `apt::pin` defined type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
1025
1026 Default value: `undef`
1027
1028 ##### <a name="-apt--source--architecture"></a>`architecture`
1029
1030 Data type: `Optional[String]`
1031
1032 Tells Apt to only download information for specified architectures. Valid options: a string containing one or more architecture names,
1033 separated by commas (e.g., 'i386' or 'i386,alpha,powerpc'). Default: undef (if unspecified, Apt downloads information for all architectures
1034 defined in the Apt::Architectures option).
1035
1036 Default value: `undef`
1037
1038 ##### <a name="-apt--source--allow_unsigned"></a>`allow_unsigned`
1039
1040 Data type: `Boolean`
1041
1042 Specifies whether to authenticate packages from this release, even if the Release file is not signed or the signature can't be checked.
1043
1044 Default value: `false`
1045
1046 ##### <a name="-apt--source--allow_insecure"></a>`allow_insecure`
1047
1048 Data type: `Boolean`
1049
1050 Specifies whether to allow downloads from insecure repositories.
1051
1052 Default value: `false`
1053
1054 ##### <a name="-apt--source--notify_update"></a>`notify_update`
1055
1056 Data type: `Boolean`
1057
1058 Specifies whether to trigger an `apt-get update` run.
1059
1060 Default value: `true`
1061
1062 ##### <a name="-apt--source--check_valid_until"></a>`check_valid_until`
1063
1064 Data type: `Boolean`
1065
1066 Specifies whether to check if the package release date is valid. Defaults to `True`.
1067
1068 Default value: `true`
1069
1070 ## Data types
1071
1072 ### <a name="Apt--Auth_conf_entry"></a>`Apt::Auth_conf_entry`
1073
1074 Login configuration settings that are recorded in the file `/etc/apt/auth.conf`.
1075
1076 * **See also**
1077   * https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html
1078   * for more information
1079
1080 Alias of
1081
1082 ```puppet
1083 Struct[{
1084     machine => String[1],
1085     login => String,
1086     password => String
1087   }]
1088 ```
1089
1090 #### Parameters
1091
1092 The following parameters are available in the `Apt::Auth_conf_entry` data type:
1093
1094 * [`machine`](#-Apt--Auth_conf_entry--machine)
1095 * [`login`](#-Apt--Auth_conf_entry--login)
1096 * [`password`](#-Apt--Auth_conf_entry--password)
1097
1098 ##### <a name="-Apt--Auth_conf_entry--machine"></a>`machine`
1099
1100 Hostname of machine to connect to.
1101
1102 ##### <a name="-Apt--Auth_conf_entry--login"></a>`login`
1103
1104 Specifies the username to connect with.
1105
1106 ##### <a name="-Apt--Auth_conf_entry--password"></a>`password`
1107
1108 Specifies the password to connect with.
1109
1110 ### <a name="Apt--Proxy"></a>`Apt::Proxy`
1111
1112 Configures Apt to connect to a proxy server.
1113
1114 Alias of
1115
1116 ```puppet
1117 Struct[{
1118     ensure     => Optional[Enum['file', 'present', 'absent']],
1119     host       => Optional[String],
1120     port       => Optional[Integer[0, 65535]],
1121     https      => Optional[Boolean],
1122     https_acng => Optional[Boolean],
1123     direct     => Optional[Boolean],
1124     perhost    => Optional[Array[Apt::Proxy_Per_Host]],
1125   }]
1126 ```
1127
1128 #### Parameters
1129
1130 The following parameters are available in the `Apt::Proxy` data type:
1131
1132 * [`ensure`](#-Apt--Proxy--ensure)
1133 * [`host`](#-Apt--Proxy--host)
1134 * [`port`](#-Apt--Proxy--port)
1135 * [`https`](#-Apt--Proxy--https)
1136 * [`direct`](#-Apt--Proxy--direct)
1137
1138 ##### <a name="-Apt--Proxy--ensure"></a>`ensure`
1139
1140 Specifies whether the proxy should exist. Valid options: 'file', 'present', and 'absent'. Prefer 'file' over 'present'.
1141
1142 ##### <a name="-Apt--Proxy--host"></a>`host`
1143
1144 Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname.
1145
1146 ##### <a name="-Apt--Proxy--port"></a>`port`
1147
1148 Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number.
1149
1150 ##### <a name="-Apt--Proxy--https"></a>`https`
1151
1152 Specifies whether to enable https proxies.
1153
1154 ##### <a name="-Apt--Proxy--direct"></a>`direct`
1155
1156 Specifies whether or not to use a `DIRECT` https proxy if http proxy is used but https is not.
1157
1158 ### <a name="Apt--Proxy_Per_Host"></a>`Apt::Proxy_Per_Host`
1159
1160 Adds per-host overrides to the system default APT proxy configuration
1161
1162 Alias of
1163
1164 ```puppet
1165 Struct[{
1166     scope      => String,
1167     host       => Optional[String],
1168     port       => Optional[Integer[1, 65535]],
1169     https      => Optional[Boolean],
1170     direct     => Optional[Boolean],
1171   }]
1172 ```
1173
1174 #### Parameters
1175
1176 The following parameters are available in the `Apt::Proxy_Per_Host` data type:
1177
1178 * [`scope`](#-Apt--Proxy_Per_Host--scope)
1179 * [`host`](#-Apt--Proxy_Per_Host--host)
1180 * [`port`](#-Apt--Proxy_Per_Host--port)
1181 * [`https`](#-Apt--Proxy_Per_Host--https)
1182 * [`direct`](#-Apt--Proxy_Per_Host--direct)
1183
1184 ##### <a name="-Apt--Proxy_Per_Host--scope"></a>`scope`
1185
1186 Specifies the scope of the override.  Valid options: a string containing a hostname.
1187
1188 ##### <a name="-Apt--Proxy_Per_Host--host"></a>`host`
1189
1190 Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname.
1191
1192 ##### <a name="-Apt--Proxy_Per_Host--port"></a>`port`
1193
1194 Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number.
1195
1196 ##### <a name="-Apt--Proxy_Per_Host--https"></a>`https`
1197
1198 Specifies whether to enable https for this override.
1199
1200 ##### <a name="-Apt--Proxy_Per_Host--direct"></a>`direct`
1201
1202 Specifies whether or not to use a `DIRECT` target to bypass the system default proxy.
1203
1204 ## Tasks
1205
1206 ### <a name="init"></a>`init`
1207
1208 Allows you to perform apt-get functions
1209
1210 **Supports noop?** false
1211
1212 #### Parameters
1213
1214 ##### `action`
1215
1216 Data type: `Enum[update, upgrade, dist-upgrade, autoremove]`
1217
1218 Action to perform with apt-get
1219