Files
dev-machine/roles/debian/tasks/main.yml
Felix Nehrke 37364e5204 Fix repos tag and add base tag
The `repos` tag was slightly broken because it was applied to the
include task but not to the included tasks. This is now fixed by simply
adding the necessary tag declaration to the included tasks.

Furthermore, I experienced a bad deadlock when the PGP key for the
Spotify packages expired. Because of that, every APT operation failed
and Ansible was unable to gather the facts required by package-related
tasks. Since the installation of the base utilities was coupled to the
`repos` tag, that tag failed as well. Because I use that tag to update
repository keys, I ended up in a deadlock.

The solution is the new `base` tag, which is only responsible for
installing the base utilities. This allows repository keys to be updated
independently of any preceding APT installations.
2026-07-15 01:42:22 +02:00

41 lines
776 B
YAML

- name: Ensure correct hostname
hostname:
name: "{{ hostname }}"
use: systemd
- name: Ensure tools to add additional apt sources
become: yes
tags: [base]
package:
name:
- ca-certificates
- curl
- gnupg
state: present
update_cache: true
- name: Ensure additional apt sources
tags: [repos]
include_tasks: 3rd-party-apt-repository.yml
loop: "{{ apt_repositories }}"
- name: Ensure apt is update to date
become: yes
tags: [packages, repos]
apt:
update_cache: yes
- name: Ensure system packages
become: yes
tags: [packages]
apt:
name: "{{ apt_packages }}"
state: present
- name: "Ensure deb-packages are installed"
become: yes
tags: [packages]
apt:
deb: "{{ item }}"
loop: "{{ deb_packages }}"