Skip to content
Snippets Groups Projects
Select Git revision
  • 72cbf89f8bb21acdc50a7a5066036d463c0241c2
  • master default protected
2 results

prepare.yml

Blame
  • prepare.yml 2.28 KiB
    ---
    - name: Prepare
      hosts: "*"
      pre_tasks:
        - name: create group
          ansible.builtin.group:
            name: "lza"
          become: true
        - name: configure additional package repositories for Debian
          block:
            - name: install GPG
              ansible.builtin.apt:
                name: "gnupg"
                state: latest
                update_cache: true
              become: true
            - name: add GPG key for SLUB Debian repository
              ansible.builtin.apt_key:
                url: "https://sdvdebianrepo.slub-dresden.de/deb-repository/pub.gpg.key"
                state: present
              become: true
            - name: add repo URL to sources.list
              ansible.builtin.apt_repository:
                repo: "deb https://sdvdebianrepo.slub-dresden.de/deb-repository bullseye main"
                state: present
                update_cache: true
                mode: "0644"
              become: true
          when: ansible_os_family == "Debian"
        - name: install tooling before running the actual tests, so we're not bound by the fixed versions
          ansible.builtin.apt:
            name: [
              "checkit-tiff*",
              "fixit-tiff",
            ]
            state: latest
            update_cache: true
          become: true
    
        - name: configure additional package repositories for RedHat
          block:
            - name: add custom repositories
              ansible.builtin.yum_repository:
                name: "{{ item.name }}"
                description: "{{ item.description }}"
                baseurl: "{{ item.baseurl }}"
                gpgcheck: "{{ item.gpgcheck | default('true') }}"
                gpgkey: "{{ item.gpgkey | default(omit) }}"
              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"
            - 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"