+ location: 'http://apt.puppetlabs.com'
+ repos: 'main'
+ key:
+ id: '6F6B15509CF8E59E6E469F327F438280EF8D349F'
+ server: 'pgp.mit.edu'
+```
+
+<a id="replace-the-default-sourceslist-file"></a>
+
+### Replace the default `sources.list` file
+
+The following example replaces the default `/etc/apt/sources.list`. Along with this code, be sure to use the `purge` parameter, or you might get duplicate source warnings when running Apt.
+
+```puppet
+apt::source { "archive.ubuntu.com-${facts['os']['distro']['codename']}":
+ location => 'http://archive.ubuntu.com/ubuntu',
+ key => '630239CC130E1A7FD81A27B140976EAF437D05B5',
+ repos => 'main universe multiverse restricted',
+}
+
+apt::source { "archive.ubuntu.com-${facts['os']['distro']['codename']}-security":
+ location => 'http://archive.ubuntu.com/ubuntu',
+ key => '630239CC130E1A7FD81A27B140976EAF437D05B5',
+ repos => 'main universe multiverse restricted',
+ release => "${facts['os']['distro']['codename']}-security"
+}
+
+apt::source { "archive.ubuntu.com-${facts['os']['distro']['codename']}-updates":
+ location => 'http://archive.ubuntu.com/ubuntu',
+ key => '630239CC130E1A7FD81A27B140976EAF437D05B5',
+ repos => 'main universe multiverse restricted',
+ release => "${facts['os']['distro']['codename']}-updates"
+}
+
+apt::source { "archive.ubuntu.com-${facts['os']['distro']['codename']}-backports":
+ location => 'http://archive.ubuntu.com/ubuntu',
+ key => '630239CC130E1A7FD81A27B140976EAF437D05B5',
+ repos => 'main universe multiverse restricted',
+ release => "${facts['os']['distro']['codename']}-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, 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 `/etc/apt/auth.conf` file follows the format of netrc (used by ftp or
+curl) and has restrictive file permissions. See [here](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 `machine`, `login` and `password` keys.
+
+```puppet
+class { 'apt':
+ auth_conf_entries => [
+ {
+ 'machine' => 'apt-proxy.example.net',
+ 'login' => 'proxylogin',
+ 'password' => 'proxypassword',
+ },
+ {
+ 'machine' => 'apt.example.com/ubuntu',
+ 'login' => 'reader',
+ 'password' => 'supersecret',
+ },
+ ],
+}
+```
+
+<a id="reference"></a>
+
+## Reference