apt: migrate apt_repository to deb822_repository
apt_repository is deprecated in favor of deb822_repository and will be removed in ansible-core 2.25. Convert all six call sites (jitsimeet, tailscale, mongodb/omada, php-sury/nextcloud, yarn/nodejs/mastodon), install python3-debian as a dependency where required, remove the legacy .list files so repositories are not duplicated, and update the apt cache explicitly where deb822_repository no longer does it. Also replace the remaining bare ansible_lsb.codename with ansible_facts['distribution_release'] in the mastodon role.
This commit is contained in:
1 parent
4f1f9026d6
commit
74140629f3
5 files changed
+124
-34
No files matched your search
@@ -35,6 +35,7 @@
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- python3-debian # Benötigt für deb822_repository
|
||||
state: present
|
||||
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
|
||||
|
||||
@@ -46,12 +47,24 @@
|
||||
mode: '0644'
|
||||
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
|
||||
|
||||
- name: backup | tailscale | remove legacy repository file (debian-based)
|
||||
tags: packages,system,system setup,tailscale
|
||||
file:
|
||||
path: /etc/apt/sources.list.d/tailscale.list
|
||||
state: absent
|
||||
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
|
||||
notify: update apt cache
|
||||
|
||||
- name: backup | tailscale | add tailscale repository (debian-based)
|
||||
tags: packages,system,system setup,tailscale
|
||||
apt_repository:
|
||||
repo: "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] }} main"
|
||||
state: present
|
||||
filename: tailscale
|
||||
deb822_repository:
|
||||
name: tailscale
|
||||
types: deb
|
||||
uris: "https://pkgs.tailscale.com/stable/{{ ansible_facts['distribution'] | lower }}"
|
||||
suites: "{{ ansible_facts['distribution_release'] }}"
|
||||
components:
|
||||
- main
|
||||
signed_by: /usr/share/keyrings/tailscale-archive-keyring.gpg
|
||||
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
|
||||
notify: update apt cache
|
||||
|
||||
|
||||
Reference in new issue
Block a user