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 by apt to perform package validation. Apt has it's own GPG keyring
38 * [`init`](#init): Allows you to perform apt functions
44 Main class, includes all other classes.
47 https://docs.puppetlabs.com/references/latest/function.html#createresources
48 for the create resource function
52 The following parameters are available in the `apt` class.
58 Specifies the provider that should be used by apt::update.
60 Default value: $apt::params::provider
66 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
69 Default value: $apt::params::keyserver
73 Data type: `Optional[String]`
75 Supplies options to be passed to the `add-apt-repository` command.
77 Default value: $apt::params::ppa_options
81 Data type: `Optional[String]`
83 Names the package that provides the `apt-add-repository` command.
85 Default value: $apt::params::ppa_package
89 Data type: `Optional[Hash]`
91 Specifies some of the default parameters used by apt::backports. Valid options: a hash made up from the following keys:
95 * **:location** `String`: See apt::backports for documentation.
96 * **:repos** `String`: See apt::backports for documentation.
97 * **:key** `String`: See apt::backports for documentation.
99 Default value: $apt::params::backports
105 Creates new `apt::conf` resources. Valid options: a hash to be passed to the create_resources function linked above.
107 Default value: $apt::params::confs
113 Configures various update settings. Valid options: a hash made up from the following keys:
117 * **: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.
118 Valid options: 'always' (at every Puppet run); 'daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400);
119 'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800); and 'reluctantly' (only if the exec resource
120 `apt_update` is notified). Default: 'reluctantly'.
121 * **:loglevel** `Integer`: Specifies the log level of logs outputted to the console. Default: undef.
122 * **:timeout** `Integer`: Specifies how long to wait for the update to complete before canceling it. Valid options: an integer, in seconds. Default: undef.
123 * **:tries** `Integer`: Specifies how many times to retry the update after receiving a DNS or HTTP error. Default: undef.
125 Default value: $apt::params::update
131 Specifies whether to purge any existing settings that aren't managed by Puppet. Valid options: a hash made up from the following keys:
135 * **:sources.list** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list. Default false.
136 * **:sources.list.d** `Boolean`: Specifies whether to purge any unmanaged entries from sources.list.d. Default false.
137 * **:preferences** `Boolean`: Specifies whether to purge any unmanaged entries from preferences. Default false.
138 * **:preferences.d.** `Boolean`: Specifies whether to purge any unmanaged entries from preferences.d. Default false.
140 Default value: $apt::params::purge
144 Data type: `Apt::Proxy`
146 Configures Apt to connect to a proxy server. Valid options: a hash matching the locally defined type apt::proxy.
148 Default value: $apt::params::proxy
154 Creates new `apt::source` resources. Valid options: a hash to be passed to the create_resources function linked above.
156 Default value: $apt::params::sources
162 Creates new `apt::key` resources. Valid options: a hash to be passed to the create_resources function linked above.
164 Default value: $apt::params::keys
170 Creates new `apt::ppa` resources. Valid options: a hash to be passed to the create_resources function linked above.
172 Default value: $apt::params::ppas
178 Creates new `apt::pin` resources. Valid options: a hash to be passed to the create_resources function linked above.
180 Default value: $apt::params::pins
186 Creates new `apt::setting` resources. Valid options: a hash to be passed to the create_resources function linked above.
188 Default value: $apt::params::settings
190 ##### `auth_conf_entries`
192 Data type: `Array[Apt::Auth_conf_entry]`
194 An optional array of login configuration settings (hashes) that are recorded in the file /etc/apt/auth.conf. This file has a netrc-like
195 format (similar to what curl uses) and contains the login configuration for APT sources and proxies that require authentication. See
196 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
197 password and no others.
199 Default value: $apt::params::auth_conf_entries
205 Specifies root directory of Apt executable.
207 Default value: $apt::params::root
213 Specifies the path of the sources_list file to use.
215 Default value: $apt::params::sources_list
217 ##### `sources_list_d`
221 Specifies the path of the sources_list.d file to use.
223 Default value: $apt::params::sources_list_d
229 Specifies the path of the conf.d file to use.
231 Default value: $apt::params::conf_d
237 Specifies the path of the preferences file to use.
239 Default value: $apt::params::preferences
241 ##### `preferences_d`
245 Specifies the path of the preferences.d file to use.
247 Default value: $apt::params::preferences_d
253 A hash made up of the various configuration files used by Apt.
255 Default value: $apt::params::config_files
257 ##### `update_defaults`
263 Default value: $apt::params::update_defaults
265 ##### `purge_defaults`
271 Default value: $apt::params::purge_defaults
273 ##### `proxy_defaults`
279 Default value: $apt::params::proxy_defaults
281 ##### `include_defaults`
287 Default value: $apt::params::include_defaults
289 ##### `source_key_defaults`
295 Default value: $apt::params::source_key_defaults
303 ##### Set up a backport for linuxmint qiana
306 apt::backports { 'qiana':
307 location => 'http://us.archive.ubuntu.com/ubuntu',
308 release => 'trusty-backports',
309 repos => 'main universe multiverse restricted',
311 id => '630239CC130E1A7FD81A27B140976EAF437D05B5',
312 server => 'hkps.pool.sks-keyservers.net',
319 The following parameters are available in the `apt::backports` class.
323 Data type: `Optional[String]`
325 Specifies an Apt repository containing the backports to manage. Valid options: a string containing a URL. Default value for Debian and
328 - Debian: 'http://deb.debian.org/debian'
330 - Ubuntu: 'http://archive.ubuntu.com/ubuntu'
332 Default value: `undef`
336 Data type: `Optional[String]`
338 Specifies a distribution of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
339 Default: on Debian and Ubuntu, '${lsbdistcodename}-backports'. We recommend keeping this default, except on other operating
342 Default value: `undef`
346 Data type: `Optional[String]`
348 Specifies a component of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file.
349 Default value for Debian and Ubuntu varies:
351 - Debian: 'main contrib non-free'
353 - Ubuntu: 'main universe multiverse restricted'
355 Default value: `undef`
359 Data type: `Optional[Variant[String, Hash]]`
361 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
362 hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
363 for Debian and Ubuntu varies:
365 - Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
367 - Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
369 Default value: `undef`
373 Data type: `Optional[Variant[Integer, String, Hash]]`
375 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
376 type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
384 Specifies a custom Apt configuration file.
388 The following parameters are available in the `apt::conf` defined type.
392 Data type: `Optional[String]`
394 Required unless `ensure` is set to 'absent'. Directly supplies content for the configuration file.
396 Default value: `undef`
400 Data type: `Enum['present', 'absent']`
402 Specifies whether the configuration file should exist. Valid options: 'present' and 'absent'.
404 Default value: present
408 Data type: `Variant[String, Integer]`
410 Determines the order in which Apt processes the configuration file. Files with lower priority numbers are loaded first.
411 Valid options: a string containing an integer or an integer.
415 ##### `notify_update`
417 Data type: `Optional[Boolean]`
419 Specifies whether to trigger an `apt-get update` run.
421 Default value: `undef`
425 Manages the GPG keys that Apt uses to authenticate packages.
427 * **Note** The apt::key defined type makes use of the apt_key type, but includes extra functionality to help prevent duplicate keys.
431 ##### Declare Apt key for apt.puppetlabs.com source
434 apt::key { 'puppetlabs':
435 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
436 server => 'hkps.pool.sks-keyservers.net',
437 options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
443 The following parameters are available in the `apt::key` defined type.
449 Specifies a GPG key to authenticate Apt package signatures. Valid options: a string containing a key ID (8 or 16 hexadecimal
450 characters, optionally prefixed with "0x") or a full key fingerprint (40 hexadecimal characters).
452 Default value: $title
456 Data type: `Enum['present', 'absent']`
458 Specifies whether the key should exist. Valid options: 'present' and 'absent'.
460 Default value: present
464 Data type: `Optional[String]`
466 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.
468 Default value: `undef`
472 Data type: `Optional[String]`
474 Specifies the location of an existing GPG key file to copy. Valid options: a string containing a URL (ftp://, http://, or https://) or
477 Default value: `undef`
483 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, or
486 Default value: $::apt::keyserver
490 Data type: `Optional[String]`
492 Passes additional options to `apt-key adv --keyserver-options`.
494 Default value: `undef`
498 Manages Apt pins. Does not trigger an apt-get update run.
501 http://linux.die.net/man/5/apt_preferences
502 for context on these parameters
506 The following parameters are available in the `apt::pin` defined type.
510 Data type: `Optional[Enum['file', 'present', 'absent']]`
512 Specifies whether the pin should exist. Valid options: 'file', 'present', and 'absent'.
514 Default value: present
518 Data type: `Optional[String]`
520 Supplies a comment to explain the pin. Default: "${caller_module_name}: ${name}".
522 Default value: `undef`
526 Data type: `Variant[Integer]`
528 Determines the order in which Apt processes the pin file. Files with lower order numbers are loaded first.
534 Data type: `Variant[String, Array]`
536 Specifies which package(s) to pin.
542 Data type: `Variant[Numeric, String]`
544 Sets the priority of the package. If multiple versions of a given package are available, `apt-get` installs the one with the highest
545 priority number (subject to dependency constraints). Valid options: an integer.
551 Data type: `Optional[String]`
553 Tells APT to prefer packages that support the specified release. Typical values include 'stable', 'testing', and 'unstable'.
557 ##### `release_version`
559 Data type: `Optional[String]`
561 Tells APT to prefer packages that support the specified operating system release version (such as Debian release version 7).
567 Data type: `Optional[String]`
569 Names the licensing component associated with the packages in the directory tree of the Release file.
575 Data type: `Optional[String]`
577 Names the originator of the packages in the directory tree of the Release file.
583 Data type: `Optional[String]`
585 Names the label of the packages in the directory tree of the Release file.
591 Data type: `Optional[String]`
599 Data type: `Optional[String]`
607 Data type: `Optional[String]`
615 Manages PPA repositories using `add-apt-repository`. Not supported on Debian.
619 ##### Example declaration of an Apt PPA
622 apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': }
627 The following parameters are available in the `apt::ppa` defined type.
633 Specifies whether the PPA should exist. Valid options: 'present' and 'absent'.
635 Default value: 'present'
639 Data type: `Optional[String]`
641 Supplies options to be passed to the `add-apt-repository` command. Default: '-y'.
643 Default value: $::apt::ppa_options
647 Data type: `Optional[String]`
649 Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint).
650 Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename.
652 Default value: $facts['lsbdistcodename']
656 Data type: `Optional[String]`
658 Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'.
660 Default value: $::apt::ppa_package
662 ##### `package_manage`
666 Specifies whether Puppet should manage the package that provides `apt-add-repository`.
668 Default value: `false`
672 Manages Apt configuration files.
675 https://docs.puppetlabs.com/references/latest/type.html#file-attributes
676 for more information on source and content parameters
680 The following parameters are available in the `apt::setting` defined type.
684 Data type: `Variant[String, Integer, Array]`
686 Determines the order in which Apt processes the configuration file. Files with higher priority numbers are loaded first.
692 Data type: `Optional[Enum['file', 'present', 'absent']]`
694 Specifies whether the file should exist. Valid options: 'present', 'absent', and 'file'.
700 Data type: `Optional[String]`
702 Required, unless `content` is set. Specifies a source file to supply the content of the configuration file. Cannot be used in combination
703 with `content`. Valid options: see link above for Puppet's native file type source attribute.
705 Default value: `undef`
709 Data type: `Optional[String]`
711 Required, unless `source` is set. Directly supplies content for the configuration file. Cannot be used in combination with `source`. Valid
712 options: see link above for Puppet's native file type content attribute.
714 Default value: `undef`
716 ##### `notify_update`
720 Specifies whether to trigger an `apt-get update` run.
722 Default value: `true`
726 Manages the Apt sources in /etc/apt/sources.list.d/.
730 ##### Install the puppetlabs apt source
733 apt::source { 'puppetlabs':
734 location => 'http://apt.puppetlabs.com',
737 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
738 server => 'hkps.pool.sks-keyservers.net',
745 The following parameters are available in the `apt::source` defined type.
749 Data type: `Optional[String]`
751 Required, unless ensure is set to 'absent'. Specifies an Apt repository. Valid options: a string containing a repository URL.
753 Default value: `undef`
759 Supplies a comment for adding to the Apt source file.
767 Specifies whether the Apt source file should exist. Valid options: 'present' and 'absent'.
769 Default value: present
773 Data type: `Optional[String]`
775 Specifies a distribution of the Apt repository.
777 Default value: `undef`
783 Specifies a component of the Apt repository.
785 Default value: 'main'
789 Data type: `Optional[Variant[Hash]]`
791 Configures include options. Valid options: a hash of available keys.
795 * **:deb** `Boolean`: Specifies whether to request the distribution's compiled binaries. Default true.
796 * **:src** `Boolean`: Specifies whether to request the distribution's uncompiled source code. Default false.
802 Data type: `Optional[Variant[String, Hash]]`
804 Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key`
805 defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or
806 `options` parameters.
808 Default value: `undef`
812 Data type: `Optional[Variant[Hash, Numeric, String]]`
814 Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the
815 `apt::pin` defined type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters.
817 Default value: `undef`
821 Data type: `Optional[String]`
823 Tells Apt to only download information for specified architectures. Valid options: a string containing one or more architecture names,
824 separated by commas (e.g., 'i386' or 'i386,alpha,powerpc'). Default: undef (if unspecified, Apt downloads information for all architectures
825 defined in the Apt::Architectures option).
827 Default value: `undef`
829 ##### `allow_unsigned`
833 Specifies whether to authenticate packages from this release, even if the Release file is not signed or the signature can't be checked.
835 Default value: `false`
837 ##### `notify_update`
841 Specifies whether to trigger an `apt-get update` run.
843 Default value: `true`
851 Allows you to perform apt functions
853 **Supports noop?** false
859 Data type: `Enum[update, upgrade]`