diff --git a/tasks/configure_package_repositories.yml b/tasks/configure_package_repositories.yml index 5f2b0b4f7040606f2e869c99edb0298eba36cb5d..b35dc16e58652150394bd911390c219c69c82a56 100644 --- a/tasks/configure_package_repositories.yml +++ b/tasks/configure_package_repositories.yml @@ -23,21 +23,33 @@ - "/etc/apt/keyrings/slub-sdvdebianrepo-key.asc" - "/etc/apt/sources.list.d/slub.list" - - name: add custom repo for SLUB's custom Debian repo - ansible.builtin.deb822_repository: - architectures: "amd64" - components: "main" - enabled: true - name: "slub" - pdiffs: true - signed_by: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key" - suites: "{{ ansible_lsb.codename }}" - uris: "{{ vault_debrepo_url }}deb-repository" - notify: update package cache - - name: > - Flush handlers (we can't wait for the handler to fire if we want to - install packages from the newly configured repo) - ansible.builtin.meta: flush_handlers + - name: Configure additional repos for Debian-based repos. + when: ansible_os_family == "Debian" + block: + - name: > + Set Mapping for Debian- and Ubuntu-Releasenames. This is necessary, + because SLUB's Debian repo server doesn't support Ubuntu releases + (yet?). Whenever this restriction is removed, then we can remove + the mapping as well. + ansible.builtin.set_fact: + releasenames: + jammy: "bookworm" + # noble: "?????????" + - name: add custom repo for SLUB's custom Debian repo + ansible.builtin.deb822_repository: + architectures: "amd64" + components: "main" + enabled: true + name: "slub" + pdiffs: true + signed_by: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key" + suites: "{{ ( ansible_distribution == 'Ubuntu' ) | ternary( releasenames[ansible_lsb.codename], ansible_lsb.codename ) }}" + uris: "{{ vault_debrepo_url }}deb-repository" + notify: update package cache + - name: > + Flush handlers (we can't wait for the handler to fire if we want to + install packages from the newly configured repo) + ansible.builtin.meta: flush_handlers - name: configure RHEL repositories when: