Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support managing login configurations in /etc/apt/auth.conf #752

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

antaflos
Copy link

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.

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.
@antaflos antaflos force-pushed the apt_auth_conf_support branch from f69e64c to d4e1a34 Compare April 30, 2018 16:32
@antaflos
Copy link
Author

Updated PR with Rubocop fixes.

@antaflos
Copy link
Author

It seems acceptance tests are failing but apparently not because of the changes in this PR.

@antaflos
Copy link
Author

antaflos commented May 1, 2018

I'll close and re-open the PR so that Travis runs the tests again, maybe the errors were caused by transient problems.

@antaflos antaflos closed this May 1, 2018
@antaflos antaflos reopened this May 1, 2018
@antaflos
Copy link
Author

antaflos commented May 1, 2018

It seems the acceptance tests are broken, and I don't think this error is related to my changes:

Error: /Stage[main]/Main/Apt_key[CentOS 6]/ensure: change from absent to present failed: Could not set 'present' on ensure: 425 Security: Bad IP connecting.

Apparently the remote FTP server from which the APT key should be fetched doesn't like Travis or Docker IP addresses (probably something about passive mode).

@tphoney
Copy link

tphoney commented Jun 21, 2018

closing, and re-openning to force travis to re-kick

@tphoney tphoney closed this Jun 21, 2018
@tphoney tphoney reopened this Jun 21, 2018
@tphoney
Copy link

tphoney commented Jun 21, 2018

Great work @antaflos !!! love it.

@tphoney tphoney merged commit 630580d into puppetlabs:master Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants