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