summaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-09-08 02:29:10 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-09-08 02:29:10 +0200
commit21fdc8853dc29c64bf0405348120945049adf694 (patch)
treefe975dd5e5aaf778f8d1c7619cd52fb8db54b7ca /roles/common
parentf6984c16a9e292a770be5dde3443c35a589c96ad (diff)
APT: Prepare config bump to Debian 12.
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/templates/etc/apt/preferences.j210
-rw-r--r--roles/common/templates/etc/apt/sources.list.j26
2 files changed, 8 insertions, 8 deletions
diff --git a/roles/common/templates/etc/apt/preferences.j2 b/roles/common/templates/etc/apt/preferences.j2
index 383037f..39b610e 100644
--- a/roles/common/templates/etc/apt/preferences.j2
+++ b/roles/common/templates/etc/apt/preferences.j2
@@ -1,10 +1,10 @@
# {{ ansible_managed }}
# Do NOT edit this file directly!
-# Install updates as soon as they're available
-Package: *
-Pin: release o=Debian, n={{ ansible_lsb.codename }}-updates
-Pin-Priority: 990
+## Install updates as soon as they're available
+#Package: *
+#Pin: release o=Debian, n={{ ansible_lsb.codename }}-updates
+#Pin-Priority: 990
{% if 'backports' in group_names -%}
# Automatically packages from backports (those manually installed)
@@ -20,7 +20,7 @@ Pin: release o=Debian
Pin-Priority: 200
{% endif %}
-{% if ansible_processor[1] is search('^(Genuine)?Intel.*') and not ansible_virtualization_role == 'guest' -%}
+{% if ansible_processor[1] is search('^(Genuine)?Intel.*') and not ansible_virtualization_role == 'guest' and ansible_lsb.major_release | int < 12 -%}
# Automatically upgrade the microcode (when manually installed)
Package: intel-microcode iucode-tool
Pin: release o=Debian
diff --git a/roles/common/templates/etc/apt/sources.list.j2 b/roles/common/templates/etc/apt/sources.list.j2
index c8f5dfc..f524f2f 100644
--- a/roles/common/templates/etc/apt/sources.list.j2
+++ b/roles/common/templates/etc/apt/sources.list.j2
@@ -2,11 +2,11 @@
# Do NOT edit this file directly!
# vim: set filetype=debsources :
-deb https://deb.debian.org/debian {{ ansible_lsb.codename }} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[1] is search("^(Genuine)?Intel.*") and not ansible_virtualization_role == 'guest') %} contrib non-free{% endif %}
+deb https://deb.debian.org/debian {{ ansible_lsb.codename }} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[1] is search("^(Genuine)?Intel.*") and not ansible_virtualization_role == 'guest' and ansible_lsb.major_release | int < 12) %} contrib non-free{% endif %}{% if ansible_lsb.major_release | int >= 12 %} non-free-firmware{% endif %}
-deb https://deb.debian.org/debian-security {{ ansible_lsb.codename }}{% if ansible_lsb.major_release | int < 11 %}/updates{% else %}-security{% endif %} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[1] is search("^(Genuine)?Intel.*") and not ansible_virtualization_role == 'guest') %} contrib non-free{% endif %}
+deb https://deb.debian.org/debian-security {{ ansible_lsb.codename }}{% if ansible_lsb.major_release | int < 11 %}/updates{% else %}-security{% endif %} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[1] is search("^(Genuine)?Intel.*") and not ansible_virtualization_role == 'guest' and ansible_lsb.major_release | int < 12) %} contrib non-free{% endif %}{% if ansible_lsb.major_release | int >= 12 %} non-free-firmware{% endif %}
-deb https://deb.debian.org/debian {{ ansible_lsb.codename }}-updates main
+deb https://deb.debian.org/debian {{ ansible_lsb.codename }}-updates main{% if ansible_lsb.major_release | int >= 12 %} non-free-firmware{% endif %}
{% if 'backports' in group_names -%}
deb https://deb.debian.org/debian {{ ansible_lsb.codename }}-backports main