2 <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
10 * [`apt`](#apt): Main class, includes all other classes.
11 * [`apt::backports`](#aptbackports): Manages backports.
15 * `apt::params`: Provides defaults for the Apt module parameters.
16 * `apt::update`: Updates the list of available packages using apt-get update.
20 * [`apt::conf`](#aptconf): Specifies a custom Apt configuration file.
21 * [`apt::key`](#aptkey): Manages the GPG keys that Apt uses to authenticate packages.
22 * [`apt::pin`](#aptpin): Manages Apt pins. Does not trigger an apt-get update run.
23 * [`apt::ppa`](#aptppa): Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
24 * [`apt::setting`](#aptsetting): Manages Apt configuration files.
25 * [`apt::source`](#aptsource): Manages the Apt sources in /etc/apt/sources.list.d/.
29 _Public Resource types_
32 _Private Resource types_
34 * `apt_key`: This type provides Puppet with the capabilities to manage GPG keys needed
35 by apt to perform package validation. Apt has it's own GPG keyring that can
36 be manipulated through the `apt-key` command.
40 * [`init`](#init): Allows you to perform apt functions
46 Main class, includes all other classes.
49 https://docs.puppetlabs.com/references/latest/function.html#createresources
50 for the create resource function
54 The following parameters are available in the `apt` class.
60 Specifies the provider that should be used by apt::update.
62 Default value: $apt::params::provider
68 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
71 Default value: $apt::params::keyserver
75 Data type: `Optional[String]`
77 Supplies options to be passed to the `add-apt-repository` command.
79 Default value: $apt::params::ppa_options
83 Data type: `Optional[String]`
85 Names the package that provides the `apt-add-repository` command.
87 Default value: $apt::params::ppa_package
91 Data type: `Optional[Hash]`
93 Specifies some of the default parameters used by apt::backports. Valid options: a hash made up from the following keys:
97 * **:location** `String`: See apt::backports for documentation.
98 * **:repos** `String`: See apt::backports for documentation.
99 * **:key** `String`: See apt::backports for documentation.
101 Default value: $apt::params::backports
107 Creates new `apt::conf` resources. Valid options: a hash to be passed to the create_resources function linked above.
109 Default value: $apt::params::confs
115 Configures various update settings. Valid options: a hash made up from the following keys:
119 * **:frequency** `String`: Specifies how often to run `apt-get update`. If the exec resource `apt_update` is notified, `apt-get update` runs regardless of this value.
120 Valid options: 'always' (at every Puppet run); 'daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400);
121 'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800); and 'reluctantly' (only if the exec resource
122 `apt_update` is notified). Default: 'reluctantly'.
123 * **:loglevel** `Integer`: Specifies the log level of logs outputted to the console. Default: undef.
124 * **:timeout** `Integer`: Specifies how long to wait for the update to complete before canceling it. Valid options: an integer, in seconds. Default: undef.
125 * **:tries** `Integer`: Specifies how many times to retry the update after receiving a DNS or HTTP error. Default: undef.
127 Default value: $apt::params::update
133 Specifies whether to purge any existing settings that aren't managed by Puppet. Valid options: a hash made up from the following keys:
137 * **:sources.list** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list. Default false.
138 * **:sources.list.d** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list.d. Default false.
139 * **:preferences** `Boolean`: Specifies whether to purge any unmanaged entries from preferences. Default false.
140 * **:preferences.d.** `Boolean`: Specifies whether to purge any unmanaged entries from preferences.d. Default false.
142 Default value: $apt::params::purge
146 Data type: `Apt::Proxy`
148 Configures Apt to connect to a proxy server. Valid options: a hash matching the locally defined type apt::proxy.
150 Default value: $apt::params::proxy
156 Creates new `apt::source` resources. Valid options: a hash to be passed to the create_resources function linked above.
158 Default value: $apt::params::sources
164 Creates new `apt::key` resources. Valid options: a hash to be passed to the create_resources function linked above.
166 Default value: $apt::params::keys
172 Creates new `apt::ppa` resources. Valid options: a hash to be passed to the create_resources function linked above.
174 Default value: $apt::params::ppas
180 Creates new `apt::pin` resources. Valid options: a hash to be passed to the create_resources function linked above.
182 Default value: $apt::params::pins
188 Creates new `apt::setting` resources. Valid options: a hash to be passed to the create_resources function linked above.
190 Default value: $apt::params::settings
192 ##### `manage_auth_conf`
196 Specifies whether to manage the /etc/apt/auth.conf file. When true, the file will be overwritten with the entries specified in
197 the auth_conf_entries parameter. When false, the file will be ignored (note that this does not set the file to absent.
199 Default value: $apt::params::manage_auth_conf
201 ##### `auth_conf_entries`
203 Data type: `Array[Apt::Auth_conf_entry]`
205 An optional array of login configuration settings (hashes) that are recorded in the file /etc/apt/auth.conf. This file has a netrc-like
206 format (similar to what curl uses) and contains the login configuration for APT sources and proxies that require authentication. See
207 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
208 password and no others. Specifying manage_auth_conf and not specifying this parameter will set /etc/apt/auth.conf to absent.
210 Default value: $apt::params::auth_conf_entries
212 ##### `auth_conf_owner`
216 The owner of the file /etc/apt/auth.conf. Default: '_apt' or 'root' on old releases.
218 Default value: $apt::params::auth_conf_owner
224 Specifies root directory of Apt executable.
226 Default value: $apt::params::root
232 Specifies the path of the sources_list file to use.
234 Default value: $apt::params::sources_list
236 ##### `sources_list_d`
240 Specifies the path of the sources_list.d file to use.
242 Default value: $apt::params::sources_list_d
248 Specifies the path of the conf.d file to use.
250 Default value: $apt::params::conf_d
256 Specifies the path of the preferences file to use.
258 Default value: $apt::params::preferences
260 ##### `preferences_d`
264 Specifies the path of the preferences.d file to use.
266 Default value: $apt::params::preferences_d
272 A hash made up of the various configuration files used by Apt.
274 Default value: $apt::params::config_files
276 ##### `update_defaults`
282 Default value: $apt::params::update_defaults
284 ##### `purge_defaults`
290 Default value: $apt::params::purge_defaults
292 ##### `proxy_defaults`
298 Default value: $apt::params::proxy_defaults
300 ##### `include_defaults`
306 Default value: $apt::params::include_defaults
308 ##### `source_key_defaults`
314 Default value: $apt::params::source_key_defaults
322 ##### Set up a backport for linuxmint qiana
325 apt::backports { 'qiana':
326 location => 'http://us.archive.ubuntu.com/ubuntu',
327 release => 'trusty-backports',
328 repos => 'main universe multiverse restricted',
330 id => '630239CC130E1A7FD81A27B140976EAF437D05B5',
331 server => 'hkps.pool.sks-keyservers.net',
338 The following parameters are available in the `apt::backports` class.
342 Data type: `Optional[String]`
344 Specifies an Apt repository containing the backports to manage. Valid options: a string containing a URL. Default value for Debian and
347 - Debian: 'http://deb.debian.org/debian'
349 - Ubuntu: 'http://archive.ubuntu.com/ubuntu'
351 Default value: `undef`
355 Data type: `Optional[String]`
357 Specifies a distribution of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
358 Default: on Debian and Ubuntu, '${lsbdistcodename}-backports'. We recommend keeping this default, except on other operating
361 Default value: `undef`
365 Data type: `Optional[String]`
367 Specifies a component of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
368 Default value for Debian and Ubuntu varies:
370 - Debian: 'main contrib non-free'
372 - Ubuntu: 'main universe multiverse restricted'
374 Default value: `undef`
378 Data type: `Optional[Variant[String, Hash]]`
380 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
381 hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
382 for Debian and Ubuntu varies:
384 - Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
386 - Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
388 Default value: `undef`
392 Data type: `Optional[Variant[Integer, String, Hash]]`
394 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
395 type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
403 Specifies a custom Apt configuration file.
407 The following parameters are available in the `apt::conf` defined type.
411 Data type: `Optional[String]`
413 Required unless `ensure` is set to 'absent'. Directly supplies content for the configuration file.
415 Default value: `undef`
419 Data type: `Enum['present', 'absent']`
421 Specifies whether the configuration file should exist. Valid options: 'present' and 'absent'.
423 Default value: present
427 Data type: `Variant[String, Integer]`
429 Determines the order in which Apt processes the configuration file. Files with lower priority numbers are loaded first.
430 Valid options: a string containing an integer or an integer.
434 ##### `notify_update`
436 Data type: `Optional[Boolean]`
438 Specifies whether to trigger an `apt-get update` run.
440 Default value: `undef`
444 Manages the GPG keys that Apt uses to authenticate packages.
446 * **Note** The apt::key defined type makes use of the apt_key type, but includes extra functionality to help prevent duplicate keys.
450 ##### Declare Apt key for apt.puppetlabs.com source
453 apt::key { 'puppetlabs':
454 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
455 server => 'hkps.pool.sks-keyservers.net',
456 options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
462 The following parameters are available in the `apt::key` defined type.
466 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/]`
468 Specifies a GPG key to authenticate Apt package signatures. Valid options: a string containing a key ID (8 or 16 hexadecimal
469 characters, optionally prefixed with "0x") or a full key fingerprint (40 hexadecimal characters).
471 Default value: $title
475 Data type: `Enum['present', 'absent', 'refreshed']`
477 Specifies whether the key should exist. Valid options: 'present', 'absent' or 'refreshed'. Using 'refreshed' will make keys auto
478 update when they have expired (assuming a new key exists on the key server).
480 Default value: present
484 Data type: `Optional[String]`
486 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.
488 Default value: `undef`
492 Data type: `Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]]`
494 Specifies the location of an existing GPG key file to copy. Valid options: a string containing a URL (ftp://, http://, or https://) or
497 Default value: `undef`
501 Data type: `Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$/]`
503 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://,
504 hkp:// or hkps://). The hkps:// protocol is currently only supported on Ubuntu 18.04.
506 Default value: $::apt::keyserver
512 Specifies whether strict SSL verification on a https URL should be disabled. Valid options: true or false.
514 Default value: `false`
518 Data type: `Optional[String]`
520 Passes additional options to `apt-key adv --keyserver-options`.
522 Default value: `undef`
526 Manages Apt pins. Does not trigger an apt-get update run.
529 http://linux.die.net/man/5/apt_preferences
530 for context on these parameters
534 The following parameters are available in the `apt::pin` defined type.
538 Data type: `Optional[Enum['file', 'present', 'absent']]`
540 Specifies whether the pin should exist. Valid options: 'file', 'present', and 'absent'.
542 Default value: present
546 Data type: `Optional[String]`
548 Supplies a comment to explain the pin. Default: "${caller_module_name}: ${name}".
550 Default value: `undef`
554 Data type: `Variant[Integer]`
556 Determines the order in which Apt processes the pin file. Files with lower order numbers are loaded first.
562 Data type: `Variant[String, Array]`
564 Specifies which package(s) to pin.
570 Data type: `Variant[Numeric, String]`
572 Sets the priority of the package. If multiple versions of a given package are available, `apt-get` installs the one with the highest
573 priority number (subject to dependency constraints). Valid options: an integer.
579 Data type: `Optional[String]`
581 Tells APT to prefer packages that support the specified release. Typical values include 'stable', 'testing', and 'unstable'.
585 ##### `release_version`
587 Data type: `Optional[String]`
589 Tells APT to prefer packages that support the specified operating system release version (such as Debian release version 7).
595 Data type: `Optional[String]`
597 Names the licensing component associated with the packages in the directory tree of the Release file.
603 Data type: `Optional[String]`
605 Names the originator of the packages in the directory tree of the Release file.
611 Data type: `Optional[String]`
613 Names the label of the packages in the directory tree of the Release file.
619 Data type: `Optional[String]`
627 Data type: `Optional[String]`
635 Data type: `Optional[String]`
643 Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
647 ##### Example declaration of an Apt PPA
650 apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': }
655 The following parameters are available in the `apt::ppa` defined type.
661 Specifies whether the PPA should exist. Valid options: 'present' and 'absent'.
663 Default value: 'present'
667 Data type: `Optional[String]`
669 Supplies options to be passed to the `add-apt-repository` command. Default: '-y'.
671 Default value: $::apt::ppa_options
675 Data type: `Optional[String]`
677 Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint).
678 Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename.
680 Default value: $facts['lsbdistcodename']
684 Data type: `Optional[String]`
686 Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'.
688 Default value: $::apt::ppa_package
690 ##### `package_manage`
694 Specifies whether Puppet should manage the package that provides `apt-add-repository`.
696 Default value: `false`
700 Manages Apt configuration files.
703 https://docs.puppetlabs.com/references/latest/type.html#file-attributes
704 for more information on source and content parameters
708 The following parameters are available in the `apt::setting` defined type.
712 Data type: `Variant[String, Integer, Array]`
714 Determines the order in which Apt processes the configuration file. Files with higher priority numbers are loaded first.
720 Data type: `Optional[Enum['file', 'present', 'absent']]`
722 Specifies whether the file should exist. Valid options: 'present', 'absent', and 'file'.
728 Data type: `Optional[String]`
730 Required, unless `content` is set. Specifies a source file to supply the content of the configuration file. Cannot be used in combination
731 with `content`. Valid options: see link above for Puppet's native file type source attribute.
733 Default value: `undef`
737 Data type: `Optional[String]`
739 Required, unless `source` is set. Directly supplies content for the configuration file. Cannot be used in combination with `source`. Valid
740 options: see link above for Puppet's native file type content attribute.
742 Default value: `undef`
744 ##### `notify_update`
748 Specifies whether to trigger an `apt-get update` run.
750 Default value: `true`
754 Manages the Apt sources in /etc/apt/sources.list.d/.
758 ##### Install the puppetlabs apt source
761 apt::source { 'puppetlabs':
762 location => 'http://apt.puppetlabs.com',
765 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
766 server => 'hkps.pool.sks-keyservers.net',
773 The following parameters are available in the `apt::source` defined type.
777 Data type: `Optional[String]`
779 Required, unless ensure is set to 'absent'. Specifies an Apt repository. Valid options: a string containing a repository URL.
781 Default value: `undef`
787 Supplies a comment for adding to the Apt source file.
795 Specifies whether the Apt source file should exist. Valid options: 'present' and 'absent'.
797 Default value: present
801 Data type: `Optional[String]`
803 Specifies a distribution of the Apt repository.
805 Default value: `undef`
811 Specifies a component of the Apt repository.
813 Default value: 'main'
817 Data type: `Optional[Variant[Hash]]`
819 Configures include options. Valid options: a hash of available keys.
823 * **:deb** `Boolean`: Specifies whether to request the distribution's compiled binaries. Default true.
824 * **:src** `Boolean`: Specifies whether to request the distribution's uncompiled source code. Default false.
830 Data type: `Optional[Variant[String, Hash]]`
832 Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key`
833 defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or
834 `options` parameters.
836 Default value: `undef`
840 Data type: `Optional[Variant[Hash, Numeric, String]]`
842 Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the
843 `apt::pin` defined type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
845 Default value: `undef`
849 Data type: `Optional[String]`
851 Tells Apt to only download information for specified architectures. Valid options: a string containing one or more architecture names,
852 separated by commas (e.g., 'i386' or 'i386,alpha,powerpc'). Default: undef (if unspecified, Apt downloads information for all architectures
853 defined in the Apt::Architectures option).
855 Default value: `undef`
857 ##### `allow_unsigned`
861 Specifies whether to authenticate packages from this release, even if the Release file is not signed or the signature can't be checked.
863 Default value: `false`
865 ##### `notify_update`
869 Specifies whether to trigger an `apt-get update` run.
871 Default value: `true`
879 Allows you to perform apt functions
881 **Supports noop?** false
887 Data type: `Enum[update, upgrade, dist-upgrade, autoremove]`