correct ansible repository

This commit is contained in:
2025-10-22 13:12:24 +02:00
parent c3ac1cfe97
commit 178f5c850a
2 changed files with 13 additions and 4 deletions

View File

@@ -17,13 +17,21 @@
tags: ansible,ansible-setup tags: ansible,ansible-setup
get_url: 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 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" dest: "/tmp/ansible-archive-keyring.asc" # Download to a temporary location
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"] when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
- name: ansible setup | dearmor GPG key and place in /usr/share/keyrings
ansible.builtin.command:
cmd: "gpg --dearmor -o /usr/share/keyrings/ansible-archive-keyring.gpg /tmp/ansible-archive-keyring.asc"
creates: "/usr/share/keyrings/ansible-archive-keyring.gpg"
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
# Hinweis: Der 'warn: false' Parameter wurde aufgrund eines Konflikts entfernt.
# Diese Aufgabe ist entscheidend für die moderne APT-Schlüsselverwaltung.
- name: ansible setup | remove repository - Debian - name: ansible setup | remove repository - Debian
tags: ansible,ansible-setup tags: ansible,ansible-setup
apt_repository: 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" repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ equivalents[ansible_distribution_release]['ubuntu'] }} main"
state: absent state: absent
update_cache: no update_cache: no
filename: ansible filename: ansible
@@ -32,7 +40,7 @@
- name: ansible setup | update repository - Debian - name: ansible setup | update repository - Debian
tags: ansible,ansible-setup tags: ansible,ansible-setup
apt_repository: 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" repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ equivalents[ansible_distribution_release]['ubuntu'] }} main"
state: present state: present
update_cache: yes update_cache: yes
filename: ansible filename: ansible
@@ -41,7 +49,7 @@
- name: ansible setup | update repository - Ubuntu - name: ansible setup | update repository - Ubuntu
tags: ansible,ansible-setup tags: ansible,ansible-setup
apt_repository: apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.asc] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release }} main" repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release }} main"
state: present state: present
update_cache: yes update_cache: yes
filename: ansible filename: ansible

View File

@@ -17,6 +17,7 @@
- "{{ nfs_client_package }}" - "{{ nfs_client_package }}"
- psmisc - psmisc
- "{{ python_netaddr_package }}" - "{{ python_netaddr_package }}"
- gnupg # Required for dearmoring GPG keys with 'gpg --dearmor'
- ranger - ranger
- sudo - sudo
- rsync - rsync