Merge pull request #773 from ekohl/apt-proxy-type
[puppet-modules/puppetlabs-apt.git] / README.md
index 9ece72bd1d83d63fcd2e93bda343ed87d9e745d1..ef9989412ddf6b78beb0a0ab15d68aca3b53e17c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -228,18 +228,18 @@ apt::source { "archive.ubuntu.com-${lsbdistcodename}-backports":
 
 ### Manage login configuration settings for an APT source or proxy in `/etc/apt/auth.conf`
 
-Starting with APT version 1.5 you can define login configuration settings (like
-username and password) for APT sources or proxies that require authentication
-in the file `/etc/apt/auth.conf`. This is preferable to embedding login
-information directly in `source.list` entries which are usually world-readable.
+Starting with APT version 1.5, you can define login configuration settings, such as
+username and password, for APT sources or proxies that require authentication
+in the `/etc/apt/auth.conf` file. This is preferable to embedding login
+information directly in `source.list` entries, which are usually world-readable.
 
-The file `/etc/apt/auth.conf` follows the format of netrc (as used by ftp or
+The `/etc/apt/auth.conf` file follows the format of netrc (used by ftp or
 curl) and has restrictive file permissions. See
 https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html for details.
 
 Use the optional `apt::auth_conf_entries` parameter to specify an array of
 hashes containing login configuration settings. These hashes may only contain
-the keys `machine`, `login` and `password`.
+the `machine`, `login` and `password` keys.
 
 ```puppet
 class { 'apt':
@@ -280,6 +280,7 @@ class { 'apt':
 * [`apt::ppa`](#defined-type-aptppa)
 * [`apt::setting`](#defined-type-aptsetting)
 * [`apt::source`](#defined-type-aptsource)
+* [`apt::proxy`](#defined-type-aptproxy)
 
 ### Types
 
@@ -321,17 +322,7 @@ All parameters are optional unless specified.
 
 * `ppas`: Creates new `apt::ppa` resources. Valid options: a hash to be passed to the [`create_resources` function](https://docs.puppetlabs.com/references/latest/function.html#createresources). Default: {}.
 
-* `proxy`: Configures Apt to connect to a proxy server. Valid options: a hash made up from the following keys:
-
-  * `host`: Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname. Default: undef.
-
-  * `port`: Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number. Default: 8080.
-
-  * `https`: Specifies whether to enable https proxies. Valid options: `true` and `false`. Default: `false`.
-
-  * `ensure`: Optional parameter. Valid options: 'file', 'present', and 'absent'. Default: `undef`. Prefer 'file' over 'present'.
-
-  * `direct`: Specifies whether or not to use a 'DIRECT' https proxy if http proxy is used but https is not. Valid options: `true` and `false`. Default: `false`.
+* `proxy`: Configures Apt to connect to a proxy server. Valid options: a hash matching the locally defined type [`apt::proxy`](#defined-type-aptproxy).
 
 * `purge`: Specifies whether to purge any existing settings that aren't managed by Puppet. Valid options: a hash made up from the following keys:
 
@@ -546,20 +537,38 @@ Manages the GPG keys that Apt uses to authenticate packages.
 
 All parameters are optional.
 
-* `content`: 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. Cannot be used in combination with `source`. Valid options: a string. Default: undef.
+* `content`: 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. Cannot be used in combination with `source`. Valid options: a string. Default: `undef`.
 
-* `options`: Passes additional options to `apt-key adv --keyserver-options`. Valid options: a string. Default: undef.
+* `options`: Passes additional options to `apt-key adv --keyserver-options`. Valid options: a string. Default: `undef`.
 
-* `server`: Specifies a keyserver to provide Puppet's GPG key. Valid options: a string containing a domain name or a full URL. Default: 'keyserver.ubuntu.com'.
+* `server`: Specifies a keyserver to provide Puppet's GPG key. Valid options: a string containing a domain name or a full URL. Default: `keyserver.ubuntu.com`.
 
-* `source`: Specifies the location of an existing GPG key file to copy. Cannot be used in combination with `content`. Valid options: a string containing a URL (ftp://, http://, or https://) or an absolute path. Default: undef.
+* `source`: Specifies the location of an existing GPG key file to copy. Cannot be used in combination with `content`. Valid options: a string containing a URL (ftp://, http://, or https://) or an absolute path. Default: `undef`.
 
-## Limitations
+#### Defined Type: `apt::proxy`
 
-This module is tested and officially supported on Debian 6 and 7 and Ubuntu 10.04, 12.04, and 14.04. Testing on other platforms has been light and cannot be guaranteed.
+Configures Apt to connect to a proxy server.
+
+##### Parameters
+
+All parameters are optional.
+
+* `host`: *Optional.* Specifies a proxy host to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: a string containing a hostname. Default: `undef`.
+
+* `port`: *Optional.* Specifies a proxy port to be stored in `/etc/apt/apt.conf.d/01proxy`. Valid options: an integer containing a port number. Default: `8080`.
+
+* `https`: *Optional.* Specifies whether to enable https proxies. Valid options: `true` and `false`. Default: `false`.
+
+* `direct`: *Optional.* Specifies whether or not to use a `DIRECT` https proxy if http proxy is used but https is not. Valid options: `true` and `false`. Default: `false`.
+
+* `ensure`: *Optional.* Specifies whether the proxy should exist. Valid options: 'file', 'present', and 'absent'. Default: undef. Prefer 'file' over 'present'.
+
+## Limitations
 
 This module is not designed to be split across [run stages](https://docs.puppetlabs.com/puppet/latest/reference/lang_run_stages.html).
 
+For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-apt/blob/master/metadata.json)
+
 ### Adding new sources or PPAs
 
 If you are adding a new source or PPA and trying to install packages from the new source or PPA on the same Puppet run, your `package` resource should depend on `Class['apt::update']`, in addition to depending on the `Apt::Source` or the `Apt::Ppa`. You can also add [collectors](https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html) to ensure that all packages happen after `apt::update`, but this can lead to dependency cycles and has implications for [virtual resources](https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html#behavior).