diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-10-30 21:03:16 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:50:27 +0200 |
commit | e54c9bc8d96bdef1c9a5634f5cff3b66f38f487e (patch) | |
tree | 4d9949aa61723f3ddd0ac8d9db5461ad209b2a55 /roles/common/templates | |
parent | a43183028558300268e4cf74fec9631d342c0406 (diff) |
Configure APT.
Diffstat (limited to 'roles/common/templates')
-rw-r--r-- | roles/common/templates/etc/apt/preferences.j2 | 14 | ||||
-rw-r--r-- | roles/common/templates/etc/apt/sources.list.j2 | 16 |
2 files changed, 30 insertions, 0 deletions
diff --git a/roles/common/templates/etc/apt/preferences.j2 b/roles/common/templates/etc/apt/preferences.j2 new file mode 100644 index 0000000..6a715b5 --- /dev/null +++ b/roles/common/templates/etc/apt/preferences.j2 @@ -0,0 +1,14 @@ +# {{ ansible_managed }} +# Do NOT edit this file directly! + +# Install updates as soon as they're available +Package: * +Pin: release a={{ ansible_lsb.codename }}-updates +Pin-Priority: 990 + +{% if 'backports' in group_names -%} +# Install automatically new versions from backports +Package: * +Pin: release a={{ ansible_lsb.codename }}-backports +Pin-Priority: 200 +{% endif %} diff --git a/roles/common/templates/etc/apt/sources.list.j2 b/roles/common/templates/etc/apt/sources.list.j2 new file mode 100644 index 0000000..b2c30d0 --- /dev/null +++ b/roles/common/templates/etc/apt/sources.list.j2 @@ -0,0 +1,16 @@ +# {{ ansible_managed }} +# Do NOT edit this file directly! + +deb http://ftp.se.debian.org/debian/ {{ ansible_lsb.codename }} main +deb-src http://ftp.se.debian.org/debian/ {{ ansible_lsb.codename }} main + +deb http://security.debian.org/ {{ ansible_lsb.codename }}/updates main +deb-src http://security.debian.org/ {{ ansible_lsb.codename }}/updates main + +deb http://ftp.se.debian.org/debian/ {{ ansible_lsb.codename }}-updates main +deb-src http://ftp.se.debian.org/debian/ {{ ansible_lsb.codename }}-updates main + +{% if 'backports' in group_names -%} +deb http://ftp.debian.org/debian/ {{ ansible_lsb.codename }}-backports main +deb-src http://ftp.debian.org/debian/ {{ ansible_lsb.codename }}-backports main +{% endif %} |