Skip to content
Snippets Groups Projects
Commit 69931808 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

style: use deb822 format and remove deprecated apt_key (resolves #2233 / ND-2723)

parent e3da4221
No related branches found
No related tags found
No related merge requests found
...@@ -76,3 +76,7 @@ ...@@ -76,3 +76,7 @@
- name: udev-Regel bekannt machen # noqa no-changed-when - name: udev-Regel bekannt machen # noqa no-changed-when
ansible.builtin.command: "udevadm control --reload" ansible.builtin.command: "udevadm control --reload"
- name: update apt cache # noqa no-changed-when
ansible.builtin.apt:
update_cache: true
...@@ -8,15 +8,20 @@ ...@@ -8,15 +8,20 @@
state: latest state: latest
update_cache: true update_cache: true
become: true become: true
- name: add GPG key for SLUB Debian repository - name: add custom repo for SLUB's custom Debian repo
ansible.builtin.apt_key: ansible.builtin.deb822_repository:
url: "https://sdvdebianrepo.slub-dresden.de/deb-repository/pub.gpg.key" architectures: "amd64"
state: present components: "main"
enabled: true
name: "slub"
pdiffs: true
signed_by: "https://sdvdebianrepo.slub-dresden.de/deb-repository/pub.gpg.key"
suites: "{{ ansible_lsb.codename }}"
uris: "https://sdvdebianrepo.slub-dresden.de/deb-repository"
notify: update apt cache
become: true become: true
- name: add repo URL to sources.list handlers:
ansible.builtin.apt_repository: - name: update apt cache
repo: "deb https://sdvdebianrepo.slub-dresden.de/deb-repository bullseye main" ansible.builtin.apt:
state: present
update_cache: true update_cache: true
mode: "0644"
become: true become: true
...@@ -2,17 +2,31 @@ ...@@ -2,17 +2,31 @@
- name: configure Debian repositories - name: configure Debian repositories
when: "ansible_facts['distribution'] == 'Debian'" when: "ansible_facts['distribution'] == 'Debian'"
block: block:
- name: öffentlichen Schlüssel hinzufügen (sonst muss bei jeder Installation eine Warnmeldung bestätigt werden) - name: |
REMOVE custom repo GPG key for SLUB's Debian repo
(apt-key deprecated)
ansible.builtin.apt_key: ansible.builtin.apt_key:
url: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key" url: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key"
tags: [aptkey] state: absent
- name: SLUB-lokales Debian-Repository für Installation der SubApp in /etc/apt/sources.list.d/ eintragen - name: REMOVE SLUB's custom Debian repo (legacy repo format)
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb {{ vault_debrepo_url }}deb-repository {{ ansible_facts['distribution_release'] }} main" repo: "deb {{ vault_debrepo_url }}deb-repository {{ ansible_lsb.codename }} main"
state: present state: absent
update_cache: "yes"
mode: "0644" - name: add custom repo for SLUB's custom Debian repo
ansible.builtin.deb822_repository:
architectures: "amd64"
components: "main"
enabled: true
name: "slub"
pdiffs: true
signed_by: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key"
suites: "{{ ansible_lsb.codename }}"
uris: "{{ vault_debrepo_url }}deb-repository"
notify: update apt cache
- name: Flush handlers (we can't wait for the handler to fire if we want to install packages from the newly configured repo)
meta: flush_handlers
- name: add custom repositories - name: add custom repositories
ansible.builtin.yum_repository: ansible.builtin.yum_repository:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment