Select Git revision
install-repair-tools.yml

Jens Steidl authored
install-repair-tools.yml 3.14 KiB
---
- name: configure Debian repositories
block:
- name: öffentlichen Schlüssel hinzufügen (sonst muss bei jeder Installation eine Warnmeldung bestätigt werden)
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
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
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 (package dependencies are encoded in the package)
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 }}"
tags: [apt]
- name: configure tool version pinning to avoid automatic nightly upgrades
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 }}"
# FHS 3.0 specifies the correct path for the config:
# https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html
- name: find checkit_tiff configs
ansible.builtin.find:
paths: "/usr/share/checkit_tiff_upcoming/example_configs/"
patterns: '*.cfg'
register: cit_configs
- name: install checkit_tiff config
copy:
src: "{{ item.path }}"
dest: "/usr/local/etc/"
remote_src: true
mode: "644"
loop: "{{ cit_configs.files }}"
- name: create caching directory
file:
state: directory
path: "{{ item }}"