only needed on debian and ubuntu

This commit is contained in:
2025-02-27 11:46:51 +01:00
parent d691ba350c
commit cc09184dbc

View File

@@ -4,11 +4,13 @@
path: "/etc/apt/sources.list"
regexp: "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main"
state: absent
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
- debug:
var: ansible_distribution_release
- debug:
var: equivalents[ansible_distribution_release]['ubuntu']
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
- name: ansible setup | get key
@@ -16,8 +18,9 @@
get_url:
url: "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" # required. HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
dest: "/usr/share/keyrings/ansible-archive-keyring.asc"
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
- name: ansible setup | update repository
- name: ansible setup | update repository - Debian
tags: ansible,ansible-setup
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.asc] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ equivalents[ansible_distribution_release]['ubuntu'] }} main"
@@ -26,7 +29,7 @@
filename: ansible
when: ansible_distribution == "Debian"
- name: ansible setup | update repository
- name: ansible setup | update repository - Ubuntu
tags: ansible,ansible-setup
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.asc] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release }} main"