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

feat: make package repo config more distro agnostic

parent cecce1b3
No related branches found
No related tags found
No related merge requests found
Pipeline #5985 passed
......@@ -77,6 +77,6 @@
- name: udev-Regel bekannt machen # noqa no-changed-when
ansible.builtin.command: "udevadm control --reload"
- name: update apt cache # noqa no-changed-when
ansible.builtin.apt:
- name: update package cache # noqa no-changed-when
ansible.builtin.package:
update_cache: true
......@@ -24,11 +24,12 @@
signed_by: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key"
suites: "{{ ansible_lsb.codename }}"
uris: "{{ vault_debrepo_url }}deb-repository"
notify: update apt cache
notify: update package cache
- name: Flush handlers (we can't wait for the handler to fire if we want to install packages from the newly configured repo)
ansible.builtin.meta: flush_handlers
- name: add custom repositories
when: ansible_os_family == "RedHat"
ansible.builtin.yum_repository:
name: "{{ item.name }}"
description: "{{ item.description }}"
......@@ -44,10 +45,11 @@
description: SLUB YUM repo
baseurl: "https://sdvrhelrepo.slub-dresden.de/"
gpgcheck: "false"
when: ansible_os_family == "RedHat"
notify: update package cache
- name: remove legacy repo configuration to avoid double configuration for SLUB repo
ansible.builtin.file:
path: "/etc/yum.repos.d/SLUB.repo"
state: absent
when: ansible_os_family == "RedHat"
notify: update package cache
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment