summaryrefslogtreecommitdiffstats
path: root/roles/common/templates/etc/apt
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/templates/etc/apt')
-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 %}