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

refactor: add all RHEL repos using Ansible yum modules instead of templating...

refactor: add all RHEL repos using Ansible yum modules instead of templating to avoid double configurations and drift
parent ad294c21
No related branches found
No related tags found
No related merge requests found
...@@ -14,11 +14,26 @@ ...@@ -14,11 +14,26 @@
mode: "0644" mode: "0644"
when: "ansible_facts['distribution'] == 'Debian'" when: "ansible_facts['distribution'] == 'Debian'"
# - name: add SLUB-local repository - name: add custom repositories
# template: yum_repository:
# src: "etc/yum.repos.d/SLUB.repo" name: "{{ item.name }}"
# dest: "/etc/yum.repos.d/SLUB.repo" description: "{{ item.description }}"
# owner: "root" baseurl: "{{ item.baseurl }}"
# group: "root" gpgcheck: "{{ item.gpgcheck | default('true') }}"
# mode: "0644" gpgkey: "{{ item.gpgkey | default(omit) }}"
# when: ansible_os_family == "RedHat" loop:
- name: "epel"
description: EPEL YUM repo
baseurl: "https://download.fedoraproject.org/pub/epel/{{ ansible_distribution_major_version }}/x86_64/"
gpgkey: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
- name: "slub"
description: SLUB YUM repo
baseurl: "http://sdvrhelrepo.slub-dresden.de/"
gpgcheck: "false"
when: ansible_os_family == "RedHat"
- name: remove legacy repo configuration to avoid double configuration for SLUB repo
file:
path: "/etc/yum.repos.d/SLUB.repo"
state: absent
when: ansible_os_family == "RedHat"
[InstallMedia-SLUB]
name=CentOS Linux 8 - SLUB
metadata_expire=-1
gpgcheck=0
enabled=1
baseurl={{ vault_yumrepo_url }}
# gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment