X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=REFERENCE.md;h=956b16d61d932d8b3688240211b9451010e2e7cf;hb=67dd216cf8bc2a444c55892f3c7f3cf190e9414f;hp=13f5f9ae5e9442e380e8f3055e97fba677743d6d;hpb=7e31732abd277c852564c10011099bdf6967dc4f;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/REFERENCE.md b/REFERENCE.md index 13f5f9a..956b16d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -20,7 +20,7 @@ * [`apt::conf`](#aptconf): Specifies a custom Apt configuration file. * [`apt::key`](#aptkey): Manages the GPG keys that Apt uses to authenticate packages. -* [`apt::mark`](#aptmark): defined typeapt::mark +* [`apt::mark`](#aptmark): Manages apt-mark settings * [`apt::pin`](#aptpin): Manages Apt pins. Does not trigger an apt-get update run. * [`apt::ppa`](#aptppa): Manages PPA repositories using `add-apt-repository`. Not supported on Debian. * [`apt::setting`](#aptsetting): Manages Apt configuration files. @@ -41,14 +41,15 @@ be manipulated through the `apt-key` command. * [`Apt::Auth_conf_entry`](#aptauth_conf_entry): Login configuration settings that are recorded in the file `/etc/apt/auth.conf`. * [`Apt::Proxy`](#aptproxy): Configures Apt to connect to a proxy server. +* [`Apt::Proxy_Per_Host`](#aptproxy_per_host): Adds per-host overrides to the system default APT proxy configuration ### Tasks -* [`init`](#init): Allows you to perform apt functions +* [`init`](#init): Allows you to perform apt-get functions ## Classes -### `apt` +### `apt` Main class, includes all other classes. @@ -58,9 +59,42 @@ Main class, includes all other classes. #### Parameters -The following parameters are available in the `apt` class. - -##### `provider` +The following parameters are available in the `apt` class: + +* [`provider`](#provider) +* [`keyserver`](#keyserver) +* [`key_options`](#key_options) +* [`ppa_options`](#ppa_options) +* [`ppa_package`](#ppa_package) +* [`backports`](#backports) +* [`confs`](#confs) +* [`update`](#update) +* [`purge`](#purge) +* [`proxy`](#proxy) +* [`sources`](#sources) +* [`keys`](#keys) +* [`ppas`](#ppas) +* [`pins`](#pins) +* [`settings`](#settings) +* [`manage_auth_conf`](#manage_auth_conf) +* [`auth_conf_entries`](#auth_conf_entries) +* [`auth_conf_owner`](#auth_conf_owner) +* [`root`](#root) +* [`sources_list`](#sources_list) +* [`sources_list_d`](#sources_list_d) +* [`conf_d`](#conf_d) +* [`preferences`](#preferences) +* [`preferences_d`](#preferences_d) +* [`config_files`](#config_files) +* [`sources_list_force`](#sources_list_force) +* [`update_defaults`](#update_defaults) +* [`purge_defaults`](#purge_defaults) +* [`proxy_defaults`](#proxy_defaults) +* [`include_defaults`](#include_defaults) +* [`apt_conf_d`](#apt_conf_d) +* [`source_key_defaults`](#source_key_defaults) + +##### `provider` Data type: `String` @@ -68,7 +102,7 @@ Specifies the provider that should be used by apt::update. Default value: `$apt::params::provider` -##### `keyserver` +##### `keyserver` Data type: `String` @@ -77,7 +111,7 @@ hkp://). Default value: `$apt::params::keyserver` -##### `key_options` +##### `key_options` Data type: `Optional[String]` @@ -85,15 +119,15 @@ Specifies the default options for apt::key resources. Default value: `$apt::params::key_options` -##### `ppa_options` +##### `ppa_options` -Data type: `Optional[String]` +Data type: `Optional[Array[String]]` Supplies options to be passed to the `add-apt-repository` command. Default value: `$apt::params::ppa_options` -##### `ppa_package` +##### `ppa_package` Data type: `Optional[String]` @@ -101,7 +135,7 @@ Names the package that provides the `apt-add-repository` command. Default value: `$apt::params::ppa_package` -##### `backports` +##### `backports` Data type: `Optional[Hash]` @@ -115,7 +149,7 @@ Options: Default value: `$apt::params::backports` -##### `confs` +##### `confs` Data type: `Hash` @@ -123,7 +157,7 @@ Creates new `apt::conf` resources. Valid options: a hash to be passed to the cre Default value: `$apt::params::confs` -##### `update` +##### `update` Data type: `Hash` @@ -131,17 +165,21 @@ Configures various update settings. Valid options: a hash made up from the follo Options: -* **: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. -Valid options: 'always' (at every Puppet run); 'daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400); -'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800); and 'reluctantly' (only if the exec resource -`apt_update` is notified). Default: 'reluctantly'. +* **: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. +Valid options: + 'always' (at every Puppet run); + daily' (if the value of `apt_update_last_success` is less than current epoch time minus 86400); + 'weekly' (if the value of `apt_update_last_success` is less than current epoch time minus 604800); + 'reluctantly' (only if the exec resource `apt_update` is notified). +Default: 'reluctantly'. * **:loglevel** `Integer`: Specifies the log level of logs outputted to the console. Default: undef. * **:timeout** `Integer`: Specifies how long to wait for the update to complete before canceling it. Valid options: an integer, in seconds. Default: undef. * **:tries** `Integer`: Specifies how many times to retry the update after receiving a DNS or HTTP error. Default: undef. Default value: `$apt::params::update` -##### `purge` +##### `purge` Data type: `Hash` @@ -156,7 +194,7 @@ Options: Default value: `$apt::params::purge` -##### `proxy` +##### `proxy` Data type: `Apt::Proxy` @@ -164,7 +202,7 @@ Configures Apt to connect to a proxy server. Valid options: a hash matching the Default value: `$apt::params::proxy` -##### `sources` +##### `sources` Data type: `Hash` @@ -172,7 +210,7 @@ Creates new `apt::source` resources. Valid options: a hash to be passed to the c Default value: `$apt::params::sources` -##### `keys` +##### `keys` Data type: `Hash` @@ -180,7 +218,7 @@ Creates new `apt::key` resources. Valid options: a hash to be passed to the crea Default value: `$apt::params::keys` -##### `ppas` +##### `ppas` Data type: `Hash` @@ -188,7 +226,7 @@ Creates new `apt::ppa` resources. Valid options: a hash to be passed to the crea Default value: `$apt::params::ppas` -##### `pins` +##### `pins` Data type: `Hash` @@ -196,7 +234,7 @@ Creates new `apt::pin` resources. Valid options: a hash to be passed to the crea Default value: `$apt::params::pins` -##### `settings` +##### `settings` Data type: `Hash` @@ -204,7 +242,7 @@ Creates new `apt::setting` resources. Valid options: a hash to be passed to the Default value: `$apt::params::settings` -##### `manage_auth_conf` +##### `manage_auth_conf` Data type: `Boolean` @@ -213,7 +251,7 @@ the auth_conf_entries parameter. When false, the file will be ignored (note that Default value: `$apt::params::manage_auth_conf` -##### `auth_conf_entries` +##### `auth_conf_entries` Data type: `Array[Apt::Auth_conf_entry]` @@ -224,7 +262,7 @@ password and no others. Specifying manage_auth_conf and not specifying this para Default value: `$apt::params::auth_conf_entries` -##### `auth_conf_owner` +##### `auth_conf_owner` Data type: `String` @@ -232,7 +270,7 @@ The owner of the file /etc/apt/auth.conf. Default: '_apt' or 'root' on old relea Default value: `$apt::params::auth_conf_owner` -##### `root` +##### `root` Data type: `String` @@ -240,7 +278,7 @@ Specifies root directory of Apt executable. Default value: `$apt::params::root` -##### `sources_list` +##### `sources_list` Data type: `String` @@ -248,7 +286,7 @@ Specifies the path of the sources_list file to use. Default value: `$apt::params::sources_list` -##### `sources_list_d` +##### `sources_list_d` Data type: `String` @@ -256,7 +294,7 @@ Specifies the path of the sources_list.d file to use. Default value: `$apt::params::sources_list_d` -##### `conf_d` +##### `conf_d` Data type: `String` @@ -264,7 +302,7 @@ Specifies the path of the conf.d file to use. Default value: `$apt::params::conf_d` -##### `preferences` +##### `preferences` Data type: `String` @@ -272,7 +310,7 @@ Specifies the path of the preferences file to use. Default value: `$apt::params::preferences` -##### `preferences_d` +##### `preferences_d` Data type: `String` @@ -280,7 +318,7 @@ Specifies the path of the preferences.d file to use. Default value: `$apt::params::preferences_d` -##### `config_files` +##### `config_files` Data type: `Hash` @@ -288,7 +326,7 @@ A hash made up of the various configuration files used by Apt. Default value: `$apt::params::config_files` -##### `sources_list_force` +##### `sources_list_force` Data type: `Boolean` @@ -296,7 +334,7 @@ Specifies whether to perform force purge or delete. Default false. Default value: `$apt::params::sources_list_force` -##### `update_defaults` +##### `update_defaults` Data type: `Hash` @@ -304,7 +342,7 @@ Data type: `Hash` Default value: `$apt::params::update_defaults` -##### `purge_defaults` +##### `purge_defaults` Data type: `Hash` @@ -312,7 +350,7 @@ Data type: `Hash` Default value: `$apt::params::purge_defaults` -##### `proxy_defaults` +##### `proxy_defaults` Data type: `Hash` @@ -320,7 +358,7 @@ Data type: `Hash` Default value: `$apt::params::proxy_defaults` -##### `include_defaults` +##### `include_defaults` Data type: `Hash` @@ -328,7 +366,7 @@ Data type: `Hash` Default value: `$apt::params::include_defaults` -##### `apt_conf_d` +##### `apt_conf_d` Data type: `String` @@ -336,15 +374,20 @@ Data type: `String` Default value: `$apt::params::apt_conf_d` -##### `source_key_defaults` +##### `source_key_defaults` Data type: `Hash` -Default value: `$apt::params::source_key_defaults` +Default value: `{ + 'server' => $keyserver, + 'options' => undef, + 'content' => undef, + 'source' => undef, + }` -### `apt::backports` +### `apt::backports` Manages backports. @@ -359,16 +402,23 @@ class { 'apt::backports': repos => 'main universe multiverse restricted', key => { id => '630239CC130E1A7FD81A27B140976EAF437D05B5', - server => 'hkps.pool.sks-keyservers.net', + server => 'keyserver.ubuntu.com', }, } ``` #### Parameters -The following parameters are available in the `apt::backports` class. +The following parameters are available in the `apt::backports` class: -##### `location` +* [`location`](#location) +* [`release`](#release) +* [`repos`](#repos) +* [`key`](#key) +* [`pin`](#pin) +* [`include`](#include) + +##### `location` Data type: `Optional[String]` @@ -381,17 +431,17 @@ Ubuntu varies: Default value: ``undef`` -##### `release` +##### `release` Data type: `Optional[String]` Specifies a distribution of the Apt repository containing the backports to manage. Used in populating the `source.list` configuration file. -Default: on Debian and Ubuntu, `${facts['os']['distro']['codename']}-backports`. We recommend keeping this default, except on other operating +Default: on Debian and Ubuntu, `${fact('os.distro.codename')}-backports`. We recommend keeping this default, except on other operating systems. Default value: ``undef`` -##### `repos` +##### `repos` Data type: `Optional[String]` @@ -404,7 +454,7 @@ Default value for Debian and Ubuntu varies: Default value: ``undef`` -##### `key` +##### `key` Data type: `Optional[Variant[String, Hash]]` @@ -418,18 +468,18 @@ for Debian and Ubuntu varies: Default value: ``undef`` -##### `pin` +##### `pin` -Data type: `Optional[Variant[Integer, String, Hash]]` +Data type: `Variant[Integer, String, Hash]` 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 type, or a hash of `parameter => value` pairs to be passed to `apt::pin`'s corresponding parameters. Default value: `200` -##### `include` +##### `include` -Data type: `Optional[Variant[Hash]]` +Data type: `Variant[Hash]` Specifies whether to include 'deb' or 'src', or both. @@ -437,15 +487,20 @@ Default value: `{}` ## Defined types -### `apt::conf` +### `apt::conf` Specifies a custom Apt configuration file. #### Parameters -The following parameters are available in the `apt::conf` defined type. +The following parameters are available in the `apt::conf` defined type: + +* [`content`](#content) +* [`ensure`](#ensure) +* [`priority`](#priority) +* [`notify_update`](#notify_update) -##### `content` +##### `content` Data type: `Optional[String]` @@ -453,7 +508,7 @@ Required unless `ensure` is set to 'absent'. Directly supplies content for the c Default value: ``undef`` -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent']` @@ -461,7 +516,7 @@ Specifies whether the configuration file should exist. Valid options: 'present' Default value: `present` -##### `priority` +##### `priority` Data type: `Variant[String, Integer]` @@ -470,7 +525,7 @@ Valid options: a string containing an integer or an integer. Default value: `50` -##### `notify_update` +##### `notify_update` Data type: `Optional[Boolean]` @@ -478,7 +533,7 @@ Specifies whether to trigger an `apt-get update` run. Default value: ``undef`` -### `apt::key` +### `apt::key` Manages the GPG keys that Apt uses to authenticate packages. @@ -491,16 +546,24 @@ Manages the GPG keys that Apt uses to authenticate packages. ```puppet apt::key { 'puppetlabs': id => '6F6B15509CF8E59E6E469F327F438280EF8D349F', - server => 'hkps.pool.sks-keyservers.net', + server => 'keyserver.ubuntu.com', options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', } ``` #### Parameters -The following parameters are available in the `apt::key` defined type. +The following parameters are available in the `apt::key` defined type: -##### `id` +* [`id`](#id) +* [`ensure`](#ensure) +* [`content`](#content) +* [`source`](#source) +* [`server`](#server) +* [`weak_ssl`](#weak_ssl) +* [`options`](#options) + +##### `id` 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/]` @@ -509,7 +572,7 @@ characters, optionally prefixed with "0x") or a full key fingerprint (40 hexadec Default value: `$title` -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent', 'refreshed']` @@ -518,7 +581,7 @@ update when they have expired (assuming a new key exists on the key server). Default value: `present` -##### `content` +##### `content` Data type: `Optional[String]` @@ -526,7 +589,7 @@ Supplies the entire GPG key. Useful in case the key can't be fetched from a remo Default value: ``undef`` -##### `source` +##### `source` Data type: `Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]]` @@ -535,16 +598,16 @@ an absolute path. Default value: ``undef`` -##### `server` +##### `server` 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\-_.]+)*\/?$/]` Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://, hkp:// or hkps://). The hkps:// protocol is currently only supported on Ubuntu 18.04. -Default value: `$::apt::keyserver` +Default value: `$apt::keyserver` -##### `weak_ssl` +##### `weak_ssl` Data type: `Boolean` @@ -552,31 +615,33 @@ Specifies whether strict SSL verification on a https URL should be disabled. Val Default value: ``false`` -##### `options` +##### `options` Data type: `Optional[String]` Passes additional options to `apt-key adv --keyserver-options`. -Default value: `$::apt::key_options` +Default value: `$apt::key_options` -### `apt::mark` +### `apt::mark` -defined typeapt::mark +Manages apt-mark settings #### Parameters -The following parameters are available in the `apt::mark` defined type. +The following parameters are available in the `apt::mark` defined type: + +* [`setting`](#setting) -##### `setting` +##### `setting` Data type: `Enum['auto','manual','hold','unhold']` auto, manual, hold, unhold specifies the behavior of apt in case of no more dependencies installed -https://manpages.debian.org/sretch/apt/apt-mark.8.en.html +https://manpages.debian.org/stable/apt/apt-mark.8.en.html -### `apt::pin` +### `apt::pin` Manages Apt pins. Does not trigger an apt-get update run. @@ -586,17 +651,31 @@ Manages Apt pins. Does not trigger an apt-get update run. #### Parameters -The following parameters are available in the `apt::pin` defined type. +The following parameters are available in the `apt::pin` defined type: -##### `ensure` +* [`ensure`](#ensure) +* [`explanation`](#explanation) +* [`order`](#order) +* [`packages`](#packages) +* [`priority`](#priority) +* [`release`](#release) +* [`release_version`](#release_version) +* [`component`](#component) +* [`originator`](#originator) +* [`label`](#label) +* [`origin`](#origin) +* [`version`](#version) +* [`codename`](#codename) -Data type: `Optional[Enum['file', 'present', 'absent']]` +##### `ensure` + +Data type: `Enum['file', 'present', 'absent']` Specifies whether the pin should exist. Valid options: 'file', 'present', and 'absent'. Default value: `present` -##### `explanation` +##### `explanation` Data type: `Optional[String]` @@ -604,7 +683,7 @@ Supplies a comment to explain the pin. Default: "${caller_module_name}: ${name}" Default value: ``undef`` -##### `order` +##### `order` Data type: `Variant[Integer]` @@ -612,7 +691,7 @@ Determines the order in which Apt processes the pin file. Files with lower order Default value: `50` -##### `packages` +##### `packages` Data type: `Variant[String, Array]` @@ -620,7 +699,7 @@ Specifies which package(s) to pin. Default value: `'*'` -##### `priority` +##### `priority` Data type: `Variant[Numeric, String]` @@ -629,7 +708,7 @@ priority number (subject to dependency constraints). Valid options: an integer. Default value: `0` -##### `release` +##### `release` Data type: `Optional[String]` @@ -637,7 +716,7 @@ Tells APT to prefer packages that support the specified release. Typical values Default value: `''` -##### `release_version` +##### `release_version` Data type: `Optional[String]` @@ -645,7 +724,7 @@ Tells APT to prefer packages that support the specified operating system release Default value: `''` -##### `component` +##### `component` Data type: `Optional[String]` @@ -653,7 +732,7 @@ Names the licensing component associated with the packages in the directory tree Default value: `''` -##### `originator` +##### `originator` Data type: `Optional[String]` @@ -661,7 +740,7 @@ Names the originator of the packages in the directory tree of the Release file. Default value: `''` -##### `label` +##### `label` Data type: `Optional[String]` @@ -669,7 +748,7 @@ Names the label of the packages in the directory tree of the Release file. Default value: `''` -##### `origin` +##### `origin` Data type: `Optional[String]` @@ -677,7 +756,7 @@ Data type: `Optional[String]` Default value: `''` -##### `version` +##### `version` Data type: `Optional[String]` @@ -685,7 +764,7 @@ Data type: `Optional[String]` Default value: `''` -##### `codename` +##### `codename` Data type: `Optional[String]` @@ -693,7 +772,7 @@ Data type: `Optional[String]` Default value: `''` -### `apt::ppa` +### `apt::ppa` Manages PPA repositories using `add-apt-repository`. Not supported on Debian. @@ -707,9 +786,16 @@ apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': } #### Parameters -The following parameters are available in the `apt::ppa` defined type. +The following parameters are available in the `apt::ppa` defined type: + +* [`ensure`](#ensure) +* [`options`](#options) +* [`release`](#release) +* [`dist`](#dist) +* [`package_name`](#package_name) +* [`package_manage`](#package_manage) -##### `ensure` +##### `ensure` Data type: `String` @@ -717,24 +803,24 @@ Specifies whether the PPA should exist. Valid options: 'present' and 'absent'. Default value: `'present'` -##### `options` +##### `options` -Data type: `Optional[String]` +Data type: `Optional[Array[String]]` Supplies options to be passed to the `add-apt-repository` command. Default: '-y'. -Default value: `$::apt::ppa_options` +Default value: `$apt::ppa_options` -##### `release` +##### `release` Data type: `Optional[String]` Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename. Optional if `puppet facts show os.distro.codename` returns your correct distribution release codename. -Default value: `$facts['os']['distro']['codename']` +Default value: `fact('os.distro.codename')` -##### `dist` +##### `dist` Data type: `Optional[String]` @@ -743,15 +829,15 @@ Optional if `puppet facts show os.name` returns your correct distribution name. Default value: `$facts['os']['name']` -##### `package_name` +##### `package_name` Data type: `Optional[String]` Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'. -Default value: `$::apt::ppa_package` +Default value: `$apt::ppa_package` -##### `package_manage` +##### `package_manage` Data type: `Boolean` @@ -759,7 +845,7 @@ Specifies whether Puppet should manage the package that provides `apt-add-reposi Default value: ``false`` -### `apt::setting` +### `apt::setting` Manages Apt configuration files. @@ -769,9 +855,15 @@ Manages Apt configuration files. #### Parameters -The following parameters are available in the `apt::setting` defined type. +The following parameters are available in the `apt::setting` defined type: + +* [`priority`](#priority) +* [`ensure`](#ensure) +* [`source`](#source) +* [`content`](#content) +* [`notify_update`](#notify_update) -##### `priority` +##### `priority` Data type: `Variant[String, Integer, Array]` @@ -779,15 +871,15 @@ Determines the order in which Apt processes the configuration file. Files with h Default value: `50` -##### `ensure` +##### `ensure` -Data type: `Optional[Enum['file', 'present', 'absent']]` +Data type: `Enum['file', 'present', 'absent']` Specifies whether the file should exist. Valid options: 'present', 'absent', and 'file'. Default value: `file` -##### `source` +##### `source` Data type: `Optional[String]` @@ -796,7 +888,7 @@ with `content`. Valid options: see link above for Puppet's native file type sour Default value: ``undef`` -##### `content` +##### `content` Data type: `Optional[String]` @@ -805,7 +897,7 @@ options: see link above for Puppet's native file type content attribute. Default value: ``undef`` -##### `notify_update` +##### `notify_update` Data type: `Boolean` @@ -813,7 +905,7 @@ Specifies whether to trigger an `apt-get update` run. Default value: ``true`` -### `apt::source` +### `apt::source` Manages the Apt sources in /etc/apt/sources.list.d/. @@ -827,16 +919,31 @@ apt::source { 'puppetlabs': repos => 'main', key => { id => '6F6B15509CF8E59E6E469F327F438280EF8D349F', - server => 'hkps.pool.sks-keyservers.net', + server => 'keyserver.ubuntu.com', }, } ``` #### Parameters -The following parameters are available in the `apt::source` defined type. - -##### `location` +The following parameters are available in the `apt::source` defined type: + +* [`location`](#location) +* [`comment`](#comment) +* [`ensure`](#ensure) +* [`release`](#release) +* [`repos`](#repos) +* [`include`](#include) +* [`key`](#key) +* [`keyring`](#keyring) +* [`pin`](#pin) +* [`architecture`](#architecture) +* [`allow_unsigned`](#allow_unsigned) +* [`allow_insecure`](#allow_insecure) +* [`notify_update`](#notify_update) +* [`check_valid_until`](#check_valid_until) + +##### `location` Data type: `Optional[String]` @@ -844,7 +951,7 @@ Required, unless ensure is set to 'absent'. Specifies an Apt repository. Valid o Default value: ``undef`` -##### `comment` +##### `comment` Data type: `String` @@ -852,7 +959,7 @@ Supplies a comment for adding to the Apt source file. Default value: `$name` -##### `ensure` +##### `ensure` Data type: `String` @@ -860,7 +967,7 @@ Specifies whether the Apt source file should exist. Valid options: 'present' and Default value: `present` -##### `release` +##### `release` Data type: `Optional[String]` @@ -868,7 +975,7 @@ Specifies a distribution of the Apt repository. Default value: ``undef`` -##### `repos` +##### `repos` Data type: `String` @@ -876,9 +983,9 @@ Specifies a component of the Apt repository. Default value: `'main'` -##### `include` +##### `include` -Data type: `Optional[Variant[Hash]]` +Data type: `Variant[Hash]` Configures include options. Valid options: a hash of available keys. @@ -889,17 +996,26 @@ Options: Default value: `{}` -##### `key` +##### `key` Data type: `Optional[Variant[String, Hash]]` Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key` -defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or -`options` parameters. +defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, `weak_ssl`, +and/or `options` parameters. + +Default value: ``undef`` + +##### `keyring` + +Data type: `Optional[Stdlib::AbsolutePath]` + +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. +See https://wiki.debian.org/DebianRepository/UseThirdParty for details. Default value: ``undef`` -##### `pin` +##### `pin` Data type: `Optional[Variant[Hash, Numeric, String]]` @@ -908,7 +1024,7 @@ Creates a declaration of the apt::pin defined type. Valid options: a number or s Default value: ``undef`` -##### `architecture` +##### `architecture` Data type: `Optional[String]` @@ -918,7 +1034,7 @@ defined in the Apt::Architectures option). Default value: ``undef`` -##### `allow_unsigned` +##### `allow_unsigned` Data type: `Boolean` @@ -926,7 +1042,15 @@ Specifies whether to authenticate packages from this release, even if the Releas Default value: ``false`` -##### `notify_update` +##### `allow_insecure` + +Data type: `Boolean` + +Specifies whether to allow downloads from insecure repositories. + +Default value: ``false`` + +##### `notify_update` Data type: `Boolean` @@ -934,11 +1058,19 @@ Specifies whether to trigger an `apt-get update` run. Default value: ``true`` +##### `check_valid_until` + +Data type: `Boolean` + +Specifies whether to check if the package release date is valid. Defaults to `True`. + +Default value: ``true`` + ## Resource types ## Data types -### `Apt::Auth_conf_entry` +### `Apt::Auth_conf_entry` Login configuration settings that are recorded in the file `/etc/apt/auth.conf`. @@ -946,70 +1078,135 @@ Login configuration settings that are recorded in the file `/etc/apt/auth.conf`. * https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html * for more information -Alias of `Struct[{ +Alias of + +```puppet +Struct[{ machine => String[1], login => String, password => String - }]` + }] +``` #### Parameters -The following parameters are available in the `Apt::Auth_conf_entry` data type. +The following parameters are available in the `Apt::Auth_conf_entry` data type: -##### `machine` +* [`machine`](#machine) +* [`login`](#login) +* [`password`](#password) + +##### `machine` Hostname of machine to connect to. -##### `login` +##### `login` Specifies the username to connect with. -##### `password` +##### `password` Specifies the password to connect with. -### `Apt::Proxy` +### `Apt::Proxy` Configures Apt to connect to a proxy server. -Alias of `Struct[{ +Alias of + +```puppet +Struct[{ ensure => Optional[Enum['file', 'present', 'absent']], host => Optional[String], port => Optional[Integer[0, 65535]], https => Optional[Boolean], https_acng => Optional[Boolean], direct => Optional[Boolean], - }]` + perhost => Optional[Array[Apt::Proxy_Per_Host]], + }] +``` #### Parameters -The following parameters are available in the `Apt::Proxy` data type. +The following parameters are available in the `Apt::Proxy` data type: -##### `ensure` +* [`ensure`](#ensure) +* [`host`](#host) +* [`port`](#port) +* [`https`](#https) +* [`direct`](#direct) + +##### `ensure` Specifies whether the proxy should exist. Valid options: 'file', 'present', and 'absent'. Prefer 'file' over 'present'. -##### `host` +##### `host` Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname. -##### `port` +##### `port` Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number. -##### `https` +##### `https` Specifies whether to enable https proxies. -##### `direct` +##### `direct` Specifies whether or not to use a `DIRECT` https proxy if http proxy is used but https is not. +### `Apt::Proxy_Per_Host` + +Adds per-host overrides to the system default APT proxy configuration + +Alias of + +```puppet +Struct[{ + scope => String, + host => Optional[String], + port => Optional[Integer[1, 65535]], + https => Optional[Boolean], + direct => Optional[Boolean], + }] +``` + +#### Parameters + +The following parameters are available in the `Apt::Proxy_Per_Host` data type: + +* [`scope`](#scope) +* [`host`](#host) +* [`port`](#port) +* [`https`](#https) +* [`direct`](#direct) + +##### `scope` + +Specifies the scope of the override. Valid options: a string containing a hostname. + +##### `host` + +Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname. + +##### `port` + +Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number. + +##### `https` + +Specifies whether to enable https for this override. + +##### `direct` + +Specifies whether or not to use a `DIRECT` target to bypass the system default proxy. + ## Tasks -### `init` +### `init` -Allows you to perform apt functions +Allows you to perform apt-get functions **Supports noop?** false @@ -1019,5 +1216,5 @@ Allows you to perform apt functions Data type: `Enum[update, upgrade, dist-upgrade, autoremove]` -Action to perform +Action to perform with apt-get