--- - name: Update repo-cache for Debian/Ubuntu become: true ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: - ansible_pkg_mgr == "apt" - name: Install requirements to add packages via https become: true ansible.builtin.apt: package: - debian-goodies - apt-dater-host - apt-transport-https state: present - name: Set ETHZ debian packages to main ansible.builtin.set_fact: l3d_pkgs__debian_packages_version: 'main contrib' when: - not l3d_pkgs__ethz_contrib | bool - not l3d_pkgs__ethz_non_free | bool - name: Set ETHZ debian packages to main contrib ansible.builtin.set_fact: l3d_pkgs__debian_packages_version: 'main contrib' when: - l3d_pkgs__ethz_contrib | bool - not l3d_pkgs__ethz_non_free | bool - name: Set ETHZ debian packages to main contrib non-free ansible.builtin.set_fact: l3d_pkgs__debian_packages_version: 'main contrib non-free' when: - l3d_pkgs__ethz_contrib | bool - l3d_pkgs__ethz_non_free | bool - not ansible_distribution_major_version >= '12' - name: Set ETHZ debian packages to main contrib non-free non-free-firmware ansible.builtin.set_fact: l3d_pkgs__debian_packages_version: 'main contrib non-free non-free-firmware' when: - l3d_pkgs__ethz_contrib | bool - l3d_pkgs__ethz_non_free | bool - ansible_distribution_major_version >= '12' - name: Add ETH zurich apt for Debian become: true ansible.builtin.template: src: "templates/apt.sources.list.j2" dest: '/etc/apt/sources.list.d/debian_ethz_ch_debian.list' mode: 0644 group: root owner: root notify: Run apt update - name: Force all notified handlers to run at this point, not waiting for normal sync points ansible.builtin.meta: flush_handlers