Skip to content
Snippets Groups Projects
Select Git revision
  • 907e845e709be2b460ea7cbf796e31ac8ffb2869
  • master default protected
2 results

README.md

Blame
  • install-repair-tools.yml 4.10 KiB
    ---
    - name: configure Debian repositories
      block:
        - name: öffentlichen Schlüssel hinzufügen (sonst muss bei jeder Installation eine Warnmeldung bestätigt werden)
          ansible.builtin.apt_key:
            url: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key"
            state: present
          when: ansible_distribution_major_version == '11'
          tags: [apt, aptkey]
        - name: SLUB-lokales Debian-Repository für Installation der SubApp in /etc/apt/sources.list.d/ eintragen
          ansible.builtin.apt_repository:
            repo: "deb {{ vault_debrepo_url }}deb-repository bullseye main"
            state: present
            update_cache: "yes"
            mode: "0644"
          when: ansible_distribution_major_version == '11'
          tags: [apt]
      when: "ansible_facts['distribution'] == 'Debian'"
    
    - name: cleanup legacy tools
      ansible.builtin.file:
        path: "{{ item }}"
        state: absent
      loop:
        - "/usr/local/bin/checkit_tiff"
        - "/usr/local/bin/fixit_tiff"
        - "/home/{{ vault_service_user }}/.cache/SLUB_LZA_Reparaturtool.cache"
        - "/etc/cit_tiff6_baseline_SLUB.cfg"
      notify: restart repairtools
    
    - name: install repairtool dependencies from local Debian repo server
      ansible.builtin.apt:
        name: [
          '{{ item.package_name }}={{ item.version }}',
        ]
        # CAUTION!!! Always use "state: present". Due to version constraints, we do
        #            not allow just any package version or automatic update
        #            mechanisms. Autoupdates will make the repair tool crash!
        state: present
      loop: "{{ tool_versions_local }}"
      tags: [apt, no-ci]
    
    - name: install repairtool (package dependencies are encoded in the package)
      ansible.builtin.apt:
        name: [
          '{{ item.package_name }}={{ item.version }}',
        ]
        # CAUTION!!! Always use "state: present". Due to version constraints, we do
        #            not allow just any package version or automatic update
        #            mechanisms. Autoupdates will make the repair tool crash!
        state: present
      loop: "{{ tool_versions_public }}"
      tags: [apt]
    
    - name: configure tool version pinning to avoid automatic nightly upgrades
      ansible.builtin.template:
        src: "etc/apt/preferences.d/pinning.j2"
        dest: "/etc/apt/preferences.d/{{ item.package_name }}"
        owner: "root"
        group: "root"
        mode: "750"
      loop: "{{ tool_versions_local }}"
    
    - name: configure tool version pinning to avoid automatic nightly upgrades
      ansible.builtin.template:
        src: "etc/apt/preferences.d/pinning.j2"
        dest: "/etc/apt/preferences.d/{{ item.package_name }}"
        owner: "root"
        group: "root"
        mode: "750"