2019-07-15 23:09:48 +02:00
|
|
|
---
|
2023-06-14 02:25:15 +02:00
|
|
|
- name: Update repo-cache for Debian/Ubuntu
|
2020-11-29 14:22:03 +01:00
|
|
|
become: true
|
2021-03-12 22:18:54 +01:00
|
|
|
ansible.builtin.apt:
|
2021-01-18 10:47:52 +01:00
|
|
|
update_cache: true
|
2020-11-29 14:22:03 +01:00
|
|
|
cache_valid_time: 3600
|
|
|
|
when:
|
2021-03-12 22:18:54 +01:00
|
|
|
- ansible_pkg_mgr == "apt"
|
2020-11-29 14:22:03 +01:00
|
|
|
|
2021-08-02 12:18:04 +02:00
|
|
|
- name: Install requirements to add packages via https
|
2020-08-28 10:41:48 +02:00
|
|
|
become: true
|
2021-03-12 22:18:54 +01:00
|
|
|
ansible.builtin.apt:
|
2019-07-15 23:47:30 +02:00
|
|
|
package:
|
|
|
|
- debian-goodies
|
|
|
|
- apt-dater-host
|
|
|
|
- apt-transport-https
|
|
|
|
state: present
|
|
|
|
|
2023-10-28 01:30:25 +02:00
|
|
|
- name: Set ETHZ debian packages to main
|
|
|
|
ansible.builtin.set_fact:
|
2024-04-27 02:43:22 +02:00
|
|
|
packages__debian_packages_version: 'main contrib'
|
2023-10-28 01:30:25 +02:00
|
|
|
when:
|
2024-04-27 02:43:22 +02:00
|
|
|
- not packages__ethz_contrib | bool
|
|
|
|
- not packages__ethz_non_free | bool
|
2023-10-28 01:30:25 +02:00
|
|
|
|
|
|
|
- name: Set ETHZ debian packages to main contrib
|
|
|
|
ansible.builtin.set_fact:
|
2024-04-27 02:43:22 +02:00
|
|
|
packages__debian_packages_version: 'main contrib'
|
2023-10-28 01:30:25 +02:00
|
|
|
when:
|
2024-04-27 02:43:22 +02:00
|
|
|
- packages__ethz_contrib | bool
|
|
|
|
- not packages__ethz_non_free | bool
|
2023-10-28 01:30:25 +02:00
|
|
|
|
|
|
|
- name: Set ETHZ debian packages to main contrib non-free
|
|
|
|
ansible.builtin.set_fact:
|
2024-04-27 02:43:22 +02:00
|
|
|
packages__debian_packages_version: 'main contrib non-free'
|
2023-10-28 01:30:25 +02:00
|
|
|
when:
|
2024-04-27 02:43:22 +02:00
|
|
|
- packages__ethz_contrib | bool
|
|
|
|
- packages__ethz_non_free | bool
|
2023-10-28 01:30:25 +02:00
|
|
|
- not ansible_distribution_major_version >= '12'
|
|
|
|
|
|
|
|
- name: Set ETHZ debian packages to main contrib non-free non-free-firmware
|
|
|
|
ansible.builtin.set_fact:
|
2024-04-27 02:43:22 +02:00
|
|
|
packages__debian_packages_version: 'main contrib non-free non-free-firmware'
|
2023-10-28 01:30:25 +02:00
|
|
|
when:
|
2024-04-27 02:43:22 +02:00
|
|
|
- packages__ethz_contrib | bool
|
|
|
|
- packages__ethz_non_free | bool
|
2023-10-28 01:30:25 +02:00
|
|
|
- ansible_distribution_major_version >= '12'
|
|
|
|
|
2023-07-31 17:26:22 +02:00
|
|
|
- name: Add ETH zurich apt for Debian
|
2019-07-15 23:09:48 +02:00
|
|
|
become: true
|
2021-08-02 12:18:04 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: "templates/apt.sources.list.j2"
|
|
|
|
dest: '/etc/apt/sources.list.d/debian_ethz_ch_debian.list'
|
2023-12-14 23:31:12 +01:00
|
|
|
mode: '0644'
|
2021-08-02 12:18:04 +02:00
|
|
|
group: root
|
|
|
|
owner: root
|
2023-06-14 02:25:15 +02:00
|
|
|
notify: Run apt update
|
2019-07-15 23:09:48 +02:00
|
|
|
|
2023-06-14 02:25:15 +02:00
|
|
|
- name: Force all notified handlers to run at this point, not waiting for normal sync points
|
2021-08-02 12:18:04 +02:00
|
|
|
ansible.builtin.meta: flush_handlers
|