1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00
ansible_role_packages/tasks/sources_ethz.yml
L3D bc965e18e5
Starting rewrite...
Cleanup and refactor...
2023-07-26 23:17:15 +02:00

42 lines
1.2 KiB
YAML

---
- 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: Add eth zurich apt for Debian Bullaeye (11) and later
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
when: ansible_distribution_major_version > '10'
- name: Add eth zurich apt for Debian Buster (10) and earlyer
become: true
ansible.builtin.template:
src: "templates/apt.sources.list_legacy.j2"
dest: '/etc/apt/sources.list.d/debian_ethz_ch_debian.list'
mode: 0644
group: root
owner: root
notify: Run apt update
when: ansible_distribution_major_version < '11'
- name: Force all notified handlers to run at this point, not waiting for normal sync points
ansible.builtin.meta: flush_handlers