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

fix: run in CI without installing specific versions of repair tools

parent b3e5f0be
No related branches found
No related tags found
No related merge requests found
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
become: true become: true
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
roles: roles:
- {role: "ansible_lza_repair", become: true, skip-tags: "no-ci"} - {role: "ansible_lza_repair", become: true}
...@@ -5,20 +5,6 @@ ...@@ -5,20 +5,6 @@
state: directory state: directory
mode: "0755" mode: "0755"
- name: Systemd-Unitfiles disablen
ansible.builtin.systemd:
unit: "{{ item.key }}"
state: stopped
enabled: false
with_dict: "{{ vault_service_files }}"
notify: systemctl daemon-reload
- name: Systemd-Unitfiles entfernen
ansible.builtin.file:
path: "/etc/systemd/user/{{ item.key }}.service"
state: absent
with_dict: "{{ vault_service_files }}"
- name: Systemd-Unitfiles installieren - name: Systemd-Unitfiles installieren
ansible.builtin.template: ansible.builtin.template:
src: "usr/local/lib/systemd/system/{{ item.key }}.service.j2" src: "usr/local/lib/systemd/system/{{ item.key }}.service.j2"
......
...@@ -17,18 +17,7 @@ ...@@ -17,18 +17,7 @@
tags: [apt] tags: [apt]
when: "ansible_facts['distribution'] == 'Debian'" when: "ansible_facts['distribution'] == 'Debian'"
- name: cleanup legacy tools - name: install repairtool dependencies from local Debian repo server (if we're running in prod)
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: ansible.builtin.apt:
name: [ name: [
'{{ item.package_name }}={{ item.version }}', '{{ item.package_name }}={{ item.version }}',
...@@ -38,9 +27,21 @@ ...@@ -38,9 +27,21 @@
# mechanisms. Autoupdates will make the repair tool crash! # mechanisms. Autoupdates will make the repair tool crash!
state: present state: present
loop: "{{ tool_versions_local }}" loop: "{{ tool_versions_local }}"
tags: [apt, no-ci] tags: [apt, notest]
- name: install repairtool (package dependencies are encoded in the package) - name: install repairtool dependencies from local Debian repo server (if we're running in CI)
ansible.builtin.apt:
name: [
'{{ item.package_name }}',
]
# 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]
- name: install repairtool (package dependencies are encoded in the package) (if we're running in prod)
ansible.builtin.apt: ansible.builtin.apt:
name: [ name: [
'{{ item.package_name }}={{ item.version }}', '{{ item.package_name }}={{ item.version }}',
...@@ -50,6 +51,18 @@ ...@@ -50,6 +51,18 @@
# mechanisms. Autoupdates will make the repair tool crash! # mechanisms. Autoupdates will make the repair tool crash!
state: present state: present
loop: "{{ tool_versions_public }}" loop: "{{ tool_versions_public }}"
tags: [apt, notest]
- name: install repairtool (package dependencies are encoded in the package) (if we're running in CI)
ansible.builtin.apt:
name: [
'{{ item.package_name }}',
]
# 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] tags: [apt]
- name: configure tool version pinning to avoid automatic nightly upgrades - name: configure tool version pinning to avoid automatic nightly upgrades
...@@ -58,7 +71,7 @@ ...@@ -58,7 +71,7 @@
dest: "/etc/apt/preferences.d/{{ item.package_name }}" dest: "/etc/apt/preferences.d/{{ item.package_name }}"
owner: "root" owner: "root"
group: "root" group: "root"
mode: "750" mode: "0750"
loop: "{{ tool_versions_local }}" loop: "{{ tool_versions_local }}"
- name: configure tool version pinning to avoid automatic nightly upgrades - name: configure tool version pinning to avoid automatic nightly upgrades
...@@ -67,7 +80,7 @@ ...@@ -67,7 +80,7 @@
dest: "/etc/apt/preferences.d/{{ item.package_name }}" dest: "/etc/apt/preferences.d/{{ item.package_name }}"
owner: "root" owner: "root"
group: "root" group: "root"
mode: "750" mode: "0750"
loop: "{{ tool_versions_public }}" loop: "{{ tool_versions_public }}"
# FHS 3.0 specifies the correct path for the config: # FHS 3.0 specifies the correct path for the config:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment