Support managing login configurations in /etc/apt/auth.conf
authorAndreas Ntaflos <andreas.ntaflos@rise-world.com>
Mon, 30 Apr 2018 16:05:30 +0000 (18:05 +0200)
committerAndreas Ntaflos <andreas.ntaflos@rise-world.com>
Mon, 30 Apr 2018 16:32:45 +0000 (18:32 +0200)
commitd4e1a346103ed0eb5d60e311da79f2ed315b716b
tree68287c18dea73c3b8653e4f5c145327acaefe883
parentd939cbd5f18ce8852713a74045b84df0b4bbc2bb
Support managing login configurations in /etc/apt/auth.conf

APT 1.5 formally introduced support for specifying login configuration
settings (like username and password) for APT sources or proxies that
require authentication in the file `/etc/apt/auth.conf`. This file
follows a netrc-like format (like ftp or curl) and has restrictive
permissions. This is preferable to embedding login information directly
in sources.list entries (which are usually world-readable). See
https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html for
details.

This change adds a new, optional class parameter
`apt::auth_conf_entries` which expects an array of hashes (defined by a
new abstract data type `Apt::Auth_conf_entry`) that represent sets of
login configuration settings to record in `/etc/apt/auth.conf`. The
file's contents are rendered using a simple EPP template.

Contains updated spec tests and documentation.
README.md
manifests/init.pp
manifests/params.pp
spec/classes/apt_spec.rb
templates/auth_conf.epp [new file with mode: 0644]
types/auth_conf_entry.pp [new file with mode: 0644]