summaryrefslogtreecommitdiffstats
path: root/roles/common/templates
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-10-30 21:03:16 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:50:27 +0200
commite54c9bc8d96bdef1c9a5634f5cff3b66f38f487e (patch)
tree4d9949aa61723f3ddd0ac8d9db5461ad209b2a55 /roles/common/templates
parenta43183028558300268e4cf74fec9631d342c0406 (diff)
Configure APT.
Diffstat (limited to 'roles/common/templates')
-rw-r--r--roles/common/templates/etc/apt/preferences.j214
-rw-r--r--roles/common/templates/etc/apt/sources.list.j216
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 %}