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.
76 lines
2.6 KiB
YAML
Executable File
76 lines
2.6 KiB
YAML
Executable File
- name: backup | utilities | install utility packages
|
|
tags: packages,system,system setup
|
|
package:
|
|
state: latest
|
|
name:
|
|
- sudo
|
|
- rsync
|
|
|
|
- name: backup | utilities | install utilities (arch)
|
|
tags: packages,system,system setup
|
|
package:
|
|
state: latest
|
|
name:
|
|
- mariadb-clients
|
|
when: ansible_facts['distribution'] == "Archlinux"
|
|
|
|
- name: backup | utilities | install utilities (debian)
|
|
tags: packages,system,system setup
|
|
package:
|
|
state: latest
|
|
name:
|
|
- mariadb-client
|
|
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
|
|
|
|
- name: backup | tailscale | install tailscale (arch)
|
|
tags: packages,system,system setup,tailscale
|
|
package:
|
|
name: tailscale
|
|
state: latest
|
|
when: ansible_facts['distribution'] == "Archlinux"
|
|
|
|
- name: backup | tailscale | install prerequisites (debian-based)
|
|
tags: packages,system,system setup,tailscale
|
|
apt:
|
|
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" ]
|
|
|
|
- name: backup | tailscale | add tailscale apt key (debian-based)
|
|
tags: packages,system,system setup,tailscale
|
|
get_url:
|
|
url: "https://pkgs.tailscale.com/stable/{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_release'] }}.noarmor.gpg"
|
|
dest: /usr/share/keyrings/tailscale-archive-keyring.gpg
|
|
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
|
|
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
|
|
|
|
- name: backup | tailscale | install tailscale (debian-based)
|
|
tags: packages,system,system setup,tailscale
|
|
apt:
|
|
name: tailscale
|
|
state: latest
|
|
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ] |