From 169f3195bdd09b9c194aaa4c4fcc9df7ba334b1b Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 7 Mar 2022 12:07:17 +0100 Subject: [PATCH] Adding optional support for debian backports --- defaults/main.yml | 1 + templates/apt.sources.list.j2 | 20 ++++++++++++++++++++ templates/apt.sources.list_legacy.j2 | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index f5183e5..5a90c01 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,6 +9,7 @@ base__add_ethz: true # add nonfree/firmware packages? base__pkg_non_free_firmware: true base__pkg_contrib: true +base__pkg_backports: false # add security repo base__pkg_security: true diff --git a/templates/apt.sources.list.j2 b/templates/apt.sources.list.j2 index a2a6a3d..c877aff 100644 --- a/templates/apt.sources.list.j2 +++ b/templates/apt.sources.list.j2 @@ -60,6 +60,26 @@ deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates {{- '\n\n' -}} {%- endif -%} +{%- if base__pkg_backports -%} +# {{ ansible_distribution_release }}-backports +deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main + {%- if base__pkg_contrib | bool -%} + {{- ' contrib' -}} + {%- endif -%} + {%- if base__pkg_non_free_firmware | bool -%} + {{- ' non-free' -}} + {%- endif -%} + {{- '\n' -}} +deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main + {%- if base__pkg_contrib | bool -%} + {{- ' contrib' -}} + {%- endif -%} + {%- if base__pkg_non_free_firmware | bool -%} + {{- ' non-free' -}} + {%- endif -%} + {{- '\n\n' -}} +{%- endif -%} + # Contact for proplems with the mirror: # https://readme.phys.ethz.ch/services/contact/ # Or #isgphys on irc.phys.ethz.ch diff --git a/templates/apt.sources.list_legacy.j2 b/templates/apt.sources.list_legacy.j2 index 4d394a7..3c7090f 100644 --- a/templates/apt.sources.list_legacy.j2 +++ b/templates/apt.sources.list_legacy.j2 @@ -59,6 +59,26 @@ deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates {{- '\n\n' -}} {%- endif -%} +{%- if base__pkg_backports -%} +# {{ ansible_distribution_release }}-backports +deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main + {%- if base__pkg_contrib | bool -%} + {{- ' contrib' -}} + {%- endif -%} + {%- if base__pkg_non_free_firmware | bool -%} + {{- ' non-free' -}} + {%- endif -%} + {{- '\n' -}} +deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main + {%- if base__pkg_contrib | bool -%} + {{- ' contrib' -}} + {%- endif -%} + {%- if base__pkg_non_free_firmware | bool -%} + {{- ' non-free' -}} + {%- endif -%} + {{- '\n\n' -}} +{%- endif -%} + # Contact for proplems with the mirror: # https://readme.phys.ethz.ch/services/contact/ # Or #isgphys on irc.phys.ethz.ch