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::mark`](#aptmark): defined typeapt::mark
23 * [`apt::pin`](#aptpin): Manages Apt pins. Does not trigger an apt-get update run.
24 * [`apt::ppa`](#aptppa): Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
25 * [`apt::setting`](#aptsetting): Manages Apt configuration files.
26 * [`apt::source`](#aptsource): Manages the Apt sources in /etc/apt/sources.list.d/.
30 _Public Resource types_
33 _Private Resource types_
35 * `apt_key`: This type provides Puppet with the capabilities to manage GPG keys needed
36 by apt to perform package validation. Apt has it's own GPG keyring that can
37 be manipulated through the `apt-key` command.
41 * [`Apt::Auth_conf_entry`](#aptauth_conf_entry): Login configuration settings that are recorded in the file `/etc/apt/auth.conf`.
42 * [`Apt::Proxy`](#aptproxy): Configures Apt to connect to a proxy server.
46 * [`init`](#init): Allows you to perform apt functions
52 Main class, includes all other classes.
55 https://docs.puppetlabs.com/references/latest/function.html#createresources
56 for the create resource function
60 The following parameters are available in the `apt` class.
66 Specifies the provider that should be used by apt::update.
68 Default value: $apt::params::provider
74 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
77 Default value: $apt::params::keyserver
81 Data type: `Optional[String]`
83 Specifies the default options for apt::key resources.
85 Default value: $apt::params::key_options
89 Data type: `Optional[String]`
91 Supplies options to be passed to the `add-apt-repository` command.
93 Default value: $apt::params::ppa_options
97 Data type: `Optional[String]`
99 Names the package that provides the `apt-add-repository` command.
101 Default value: $apt::params::ppa_package
105 Data type: `Optional[Hash]`
107 Specifies some of the default parameters used by apt::backports. Valid options: a hash made up from the following keys:
111 * **:location** `String`: See apt::backports for documentation.
112 * **:repos** `String`: See apt::backports for documentation.
113 * **:key** `String`: See apt::backports for documentation.
115 Default value: $apt::params::backports
121 Creates new `apt::conf` resources. Valid options: a hash to be passed to the create_resources function linked above.
123 Default value: $apt::params::confs
129 Configures various update settings. Valid options: a hash made up from the following keys:
133 * **: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.
134 Valid options: 'always' (at every Puppet run); 'daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400);
135 'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800); and 'reluctantly' (only if the exec resource
136 `apt_update` is notified). Default: 'reluctantly'.
137 * **:loglevel** `Integer`: Specifies the log level of logs outputted to the console. Default: undef.
138 * **:timeout** `Integer`: Specifies how long to wait for the update to complete before canceling it. Valid options: an integer, in seconds. Default: undef.
139 * **:tries** `Integer`: Specifies how many times to retry the update after receiving a DNS or HTTP error. Default: undef.
141 Default value: $apt::params::update
147 Specifies whether to purge any existing settings that aren't managed by Puppet. Valid options: a hash made up from the following keys:
151 * **:sources.list** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list. Default false.
152 * **:sources.list.d** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list.d. Default false.
153 * **:preferences** `Boolean`: Specifies whether to purge any unmanaged entries from preferences. Default false.
154 * **:preferences.d.** `Boolean`: Specifies whether to purge any unmanaged entries from preferences.d. Default false.
156 Default value: $apt::params::purge
160 Data type: `Apt::Proxy`
162 Configures Apt to connect to a proxy server. Valid options: a hash matching the locally defined type apt::proxy.
164 Default value: $apt::params::proxy
170 Creates new `apt::source` resources. Valid options: a hash to be passed to the create_resources function linked above.
172 Default value: $apt::params::sources
178 Creates new `apt::key` resources. Valid options: a hash to be passed to the create_resources function linked above.
180 Default value: $apt::params::keys
186 Creates new `apt::ppa` resources. Valid options: a hash to be passed to the create_resources function linked above.
188 Default value: $apt::params::ppas
194 Creates new `apt::pin` resources. Valid options: a hash to be passed to the create_resources function linked above.
196 Default value: $apt::params::pins
202 Creates new `apt::setting` resources. Valid options: a hash to be passed to the create_resources function linked above.
204 Default value: $apt::params::settings
206 ##### `manage_auth_conf`
210 Specifies whether to manage the /etc/apt/auth.conf file. When true, the file will be overwritten with the entries specified in
211 the auth_conf_entries parameter. When false, the file will be ignored (note that this does not set the file to absent.
213 Default value: $apt::params::manage_auth_conf
215 ##### `auth_conf_entries`
217 Data type: `Array[Apt::Auth_conf_entry]`
219 An optional array of login configuration settings (hashes) that are recorded in the file /etc/apt/auth.conf. This file has a netrc-like
220 format (similar to what curl uses) and contains the login configuration for APT sources and proxies that require authentication. See
221 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
222 password and no others. Specifying manage_auth_conf and not specifying this parameter will set /etc/apt/auth.conf to absent.
224 Default value: $apt::params::auth_conf_entries
226 ##### `auth_conf_owner`
230 The owner of the file /etc/apt/auth.conf. Default: '_apt' or 'root' on old releases.
232 Default value: $apt::params::auth_conf_owner
238 Specifies root directory of Apt executable.
240 Default value: $apt::params::root
246 Specifies the path of the sources_list file to use.
248 Default value: $apt::params::sources_list
250 ##### `sources_list_d`
254 Specifies the path of the sources_list.d file to use.
256 Default value: $apt::params::sources_list_d
262 Specifies the path of the conf.d file to use.
264 Default value: $apt::params::conf_d
270 Specifies the path of the preferences file to use.
272 Default value: $apt::params::preferences
274 ##### `preferences_d`
278 Specifies the path of the preferences.d file to use.
280 Default value: $apt::params::preferences_d
286 A hash made up of the various configuration files used by Apt.
288 Default value: $apt::params::config_files
290 ##### `update_defaults`
296 Default value: $apt::params::update_defaults
298 ##### `purge_defaults`
304 Default value: $apt::params::purge_defaults
306 ##### `proxy_defaults`
312 Default value: $apt::params::proxy_defaults
314 ##### `include_defaults`
320 Default value: $apt::params::include_defaults
328 Default value: $apt::params::apt_conf_d
330 ##### `source_key_defaults`
336 Default value: $apt::params::source_key_defaults
344 ##### Set up a backport for linuxmint qiana
347 apt::backports { 'qiana':
348 location => 'http://us.archive.ubuntu.com/ubuntu',
349 release => 'trusty-backports',
350 repos => 'main universe multiverse restricted',
352 id => '630239CC130E1A7FD81A27B140976EAF437D05B5',
353 server => 'hkps.pool.sks-keyservers.net',
360 The following parameters are available in the `apt::backports` class.
364 Data type: `Optional[String]`
366 Specifies an Apt repository containing the backports to manage. Valid options: a string containing a URL. Default value for Debian and
369 - Debian: 'http://deb.debian.org/debian'
371 - Ubuntu: 'http://archive.ubuntu.com/ubuntu'
373 Default value: `undef`
377 Data type: `Optional[String]`
379 Specifies a distribution of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
380 Default: on Debian and Ubuntu, '${lsbdistcodename}-backports'. We recommend keeping this default, except on other operating
383 Default value: `undef`
387 Data type: `Optional[String]`
389 Specifies a component of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
390 Default value for Debian and Ubuntu varies:
392 - Debian: 'main contrib non-free'
394 - Ubuntu: 'main universe multiverse restricted'
396 Default value: `undef`
400 Data type: `Optional[Variant[String, Hash]]`
402 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
403 hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
404 for Debian and Ubuntu varies:
406 - Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
408 - Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
410 Default value: `undef`
414 Data type: `Optional[Variant[Integer, String, Hash]]`
416 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
417 type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
423 Data type: `Optional[Variant[Hash]]`
425 Specifies whether to include 'deb' or 'src', or both.
433 Specifies a custom Apt configuration file.
437 The following parameters are available in the `apt::conf` defined type.
441 Data type: `Optional[String]`
443 Required unless `ensure` is set to 'absent'. Directly supplies content for the configuration file.
445 Default value: `undef`
449 Data type: `Enum['present', 'absent']`
451 Specifies whether the configuration file should exist. Valid options: 'present' and 'absent'.
453 Default value: present
457 Data type: `Variant[String, Integer]`
459 Determines the order in which Apt processes the configuration file. Files with lower priority numbers are loaded first.
460 Valid options: a string containing an integer or an integer.
464 ##### `notify_update`
466 Data type: `Optional[Boolean]`
468 Specifies whether to trigger an `apt-get update` run.
470 Default value: `undef`
474 Manages the GPG keys that Apt uses to authenticate packages.
476 * **Note** The apt::key defined type makes use of the apt_key type, but includes extra functionality to help prevent duplicate keys.
480 ##### Declare Apt key for apt.puppetlabs.com source
483 apt::key { 'puppetlabs':
484 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
485 server => 'hkps.pool.sks-keyservers.net',
486 options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
492 The following parameters are available in the `apt::key` defined type.
496 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/]`
498 Specifies a GPG key to authenticate Apt package signatures. Valid options: a string containing a key ID (8 or 16 hexadecimal
499 characters, optionally prefixed with "0x") or a full key fingerprint (40 hexadecimal characters).
501 Default value: $title
505 Data type: `Enum['present', 'absent', 'refreshed']`
507 Specifies whether the key should exist. Valid options: 'present', 'absent' or 'refreshed'. Using 'refreshed' will make keys auto
508 update when they have expired (assuming a new key exists on the key server).
510 Default value: present
514 Data type: `Optional[String]`
516 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.
518 Default value: `undef`
522 Data type: `Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]]`
524 Specifies the location of an existing GPG key file to copy. Valid options: a string containing a URL (ftp://, http://, or https://) or
527 Default value: `undef`
531 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\-_.]+)*\/?$/]`
533 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://,
534 hkp:// or hkps://). The hkps:// protocol is currently only supported on Ubuntu 18.04.
536 Default value: $::apt::keyserver
542 Specifies whether strict SSL verification on a https URL should be disabled. Valid options: true or false.
544 Default value: `false`
548 Data type: `Optional[String]`
550 Passes additional options to `apt-key adv --keyserver-options`.
552 Default value: $::apt::key_options
556 defined typeapt::mark
560 The following parameters are available in the `apt::mark` defined type.
564 Data type: `Enum['auto','manual','hold','unhold']`
566 auto, manual, hold, unhold
567 specifies the behavior of apt in case of no more dependencies installed
568 https://manpages.debian.org/sretch/apt/apt-mark.8.en.html
572 Manages Apt pins. Does not trigger an apt-get update run.
575 http://linux.die.net/man/5/apt_preferences
576 for context on these parameters
580 The following parameters are available in the `apt::pin` defined type.
584 Data type: `Optional[Enum['file', 'present', 'absent']]`
586 Specifies whether the pin should exist. Valid options: 'file', 'present', and 'absent'.
588 Default value: present
592 Data type: `Optional[String]`
594 Supplies a comment to explain the pin. Default: "${caller_module_name}: ${name}".
596 Default value: `undef`
600 Data type: `Variant[Integer]`
602 Determines the order in which Apt processes the pin file. Files with lower order numbers are loaded first.
608 Data type: `Variant[String, Array]`
610 Specifies which package(s) to pin.
616 Data type: `Variant[Numeric, String]`
618 Sets the priority of the package. If multiple versions of a given package are available, `apt-get` installs the one with the highest
619 priority number (subject to dependency constraints). Valid options: an integer.
625 Data type: `Optional[String]`
627 Tells APT to prefer packages that support the specified release. Typical values include 'stable', 'testing', and 'unstable'.
631 ##### `release_version`
633 Data type: `Optional[String]`
635 Tells APT to prefer packages that support the specified operating system release version (such as Debian release version 7).
641 Data type: `Optional[String]`
643 Names the licensing component associated with the packages in the directory tree of the Release file.
649 Data type: `Optional[String]`
651 Names the originator of the packages in the directory tree of the Release file.
657 Data type: `Optional[String]`
659 Names the label of the packages in the directory tree of the Release file.
665 Data type: `Optional[String]`
673 Data type: `Optional[String]`
681 Data type: `Optional[String]`
689 Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
693 ##### Example declaration of an Apt PPA
696 apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': }
701 The following parameters are available in the `apt::ppa` defined type.
707 Specifies whether the PPA should exist. Valid options: 'present' and 'absent'.
709 Default value: 'present'
713 Data type: `Optional[String]`
715 Supplies options to be passed to the `add-apt-repository` command. Default: '-y'.
717 Default value: $::apt::ppa_options
721 Data type: `Optional[String]`
723 Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint).
724 Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename.
726 Default value: $facts['lsbdistcodename']
730 Data type: `Optional[String]`
732 Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint).
733 Specifies the distribution of your node. Valid options: a string containing a valid distribution codename.
735 Default value: $facts['lsbdistid']
739 Data type: `Optional[String]`
741 Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'.
743 Default value: $::apt::ppa_package
745 ##### `package_manage`
749 Specifies whether Puppet should manage the package that provides `apt-add-repository`.
751 Default value: `false`
755 Manages Apt configuration files.
758 https://docs.puppetlabs.com/references/latest/type.html#file-attributes
759 for more information on source and content parameters
763 The following parameters are available in the `apt::setting` defined type.
767 Data type: `Variant[String, Integer, Array]`
769 Determines the order in which Apt processes the configuration file. Files with higher priority numbers are loaded first.
775 Data type: `Optional[Enum['file', 'present', 'absent']]`
777 Specifies whether the file should exist. Valid options: 'present', 'absent', and 'file'.
783 Data type: `Optional[String]`
785 Required, unless `content` is set. Specifies a source file to supply the content of the configuration file. Cannot be used in combination
786 with `content`. Valid options: see link above for Puppet's native file type source attribute.
788 Default value: `undef`
792 Data type: `Optional[String]`
794 Required, unless `source` is set. Directly supplies content for the configuration file. Cannot be used in combination with `source`. Valid
795 options: see link above for Puppet's native file type content attribute.
797 Default value: `undef`
799 ##### `notify_update`
803 Specifies whether to trigger an `apt-get update` run.
805 Default value: `true`
809 Manages the Apt sources in /etc/apt/sources.list.d/.
813 ##### Install the puppetlabs apt source
816 apt::source { 'puppetlabs':
817 location => 'http://apt.puppetlabs.com',
820 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
821 server => 'hkps.pool.sks-keyservers.net',
828 The following parameters are available in the `apt::source` defined type.
832 Data type: `Optional[String]`
834 Required, unless ensure is set to 'absent'. Specifies an Apt repository. Valid options: a string containing a repository URL.
836 Default value: `undef`
842 Supplies a comment for adding to the Apt source file.
850 Specifies whether the Apt source file should exist. Valid options: 'present' and 'absent'.
852 Default value: present
856 Data type: `Optional[String]`
858 Specifies a distribution of the Apt repository.
860 Default value: `undef`
866 Specifies a component of the Apt repository.
868 Default value: 'main'
872 Data type: `Optional[Variant[Hash]]`
874 Configures include options. Valid options: a hash of available keys.
878 * **:deb** `Boolean`: Specifies whether to request the distribution's compiled binaries. Default true.
879 * **:src** `Boolean`: Specifies whether to request the distribution's uncompiled source code. Default false.
885 Data type: `Optional[Variant[String, Hash]]`
887 Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key`
888 defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or
889 `options` parameters.
891 Default value: `undef`
895 Data type: `Optional[Variant[Hash, Numeric, String]]`
897 Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the
898 `apt::pin` defined type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
900 Default value: `undef`
904 Data type: `Optional[String]`
906 Tells Apt to only download information for specified architectures. Valid options: a string containing one or more architecture names,
907 separated by commas (e.g., 'i386' or 'i386,alpha,powerpc'). Default: undef (if unspecified, Apt downloads information for all architectures
908 defined in the Apt::Architectures option).
910 Default value: `undef`
912 ##### `allow_unsigned`
916 Specifies whether to authenticate packages from this release, even if the Release file is not signed or the signature can't be checked.
918 Default value: `false`
920 ##### `notify_update`
924 Specifies whether to trigger an `apt-get update` run.
926 Default value: `true`
932 ### Apt::Auth_conf_entry
934 Login configuration settings that are recorded in the file `/etc/apt/auth.conf`.
937 https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html
941 machine => String[1],
948 The following parameters are available in the `Apt::Auth_conf_entry` data type.
952 Hostname of machine to connect to.
956 Specifies the username to connect with.
960 Specifies the password to connect with.
964 Configures Apt to connect to a proxy server.
967 ensure => Optional[Enum['file', 'present', 'absent']],
968 host => Optional[String],
969 port => Optional[Integer[0, 65535]],
970 https => Optional[Boolean],
971 direct => Optional[Boolean],
976 The following parameters are available in the `Apt::Proxy` data type.
980 Specifies whether the proxy should exist. Valid options: 'file', 'present', and 'absent'. Prefer 'file' over 'present'.
984 Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname.
988 Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number.
992 Specifies whether to enable https proxies.
996 Specifies whether or not to use a `DIRECT` https proxy if http proxy is used but https is not.
1002 Allows you to perform apt functions
1004 **Supports noop?** false
1010 Data type: `Enum[update, upgrade, dist-upgrade, autoremove]`