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

fix: #1

parent bc287d1e
No related branches found
No related tags found
1 merge request!4Resolve "wrong use of systemd templates for validation cleanup service"
Pipeline #4516 failed
...@@ -51,25 +51,22 @@ ...@@ -51,25 +51,22 @@
# we place them below "/usr/" instead of "/etc/". # we place them below "/usr/" instead of "/etc/".
- name: create symlinks for validation tool profiles - name: create symlinks for validation tool profiles
ansible.builtin.file: ansible.builtin.file:
src: "{{ item.s }}" # file to link to src: "{{ item.s | default(omit) }}" # file to link to
dest: "/usr/local/etc/{{ item.d }}" # symlink file path dest: "/usr/local/etc/{{ item.d }}" # symlink file path
state: "{{ item.state | default('link') }}" state: "{{ item.state | default('link') }}"
loop: loop:
# TIFF 6 # TIFF 6
- s: "/usr/share/checkit_tiff_current/example_configs/cit_tiff6_baseline_SLUB.cfg" - d: "cit_tiff6_baseline_SLUB_current.cfg"
d: "cit_tiff6_baseline_SLUB_current.cfg"
state: "absent" state: "absent"
- s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_baseline_SLUB.cfg" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_baseline_SLUB.cfg"
d: "cit_tiff6_baseline_SLUB_upcoming.cfg" d: "cit_tiff6_baseline_SLUB_upcoming.cfg"
# GeoTIFF 6 # GeoTIFF 6
- s: "/usr/share/checkit_tiff_current/example_configs/cit_tiff6_geotiff_SLUB.cfg" - d: "cit_tiff6_geotiff_SLUB_current.cfg"
d: "cit_tiff6_geotiff_SLUB_current.cfg"
state: "absent" state: "absent"
- s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_geotiff_SLUB.cfg" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_geotiff_SLUB.cfg"
d: "cit_tiff6_geotiff_SLUB_upcoming.cfg" d: "cit_tiff6_geotiff_SLUB_upcoming.cfg"
# Retrofotos Fotothek # Retrofotos Fotothek
- s: "/usr/share/checkit_tiff_current/example_configs/cit_tiff_retrofotos_SLUB.cfg" - d: "cit_tiff_retrofotos_SLUB_current.cfg"
d: "cit_tiff_retrofotos_SLUB_current.cfg"
state: "absent" state: "absent"
- s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff_retrofotos_SLUB.cfg" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff_retrofotos_SLUB.cfg"
d: "cit_tiff_retrofotos_SLUB_upcoming.cfg" d: "cit_tiff_retrofotos_SLUB_upcoming.cfg"
...@@ -124,7 +121,7 @@ ...@@ -124,7 +121,7 @@
group: "root" group: "root"
loop: loop:
- "cleanup_daemon_@.service" - "cleanup_daemon_@.service"
- "cleanup_daemon.timer" - "cleanup_daemon_@.timer"
- "validation_daemon_any@.service" - "validation_daemon_any@.service"
- "validation_daemon_any.socket" - "validation_daemon_any.socket"
- "validation_daemon_@.service" # Daemon service - "validation_daemon_@.service" # Daemon service
...@@ -146,18 +143,28 @@ ...@@ -146,18 +143,28 @@
- name: enable & start cleanup daemon - name: enable & start cleanup daemon
ansible.builtin.systemd: ansible.builtin.systemd:
unit: "{{ item.u }}" unit: "cleanup_daemon_@{{ item.u }}"
daemon_reload: true daemon_reload: true
enabled: true enabled: true
state: "{{ item.s | default(omit) }}" # this can never be idempotent state: "{{ item.s | default(omit) }}" # this can never be idempotent
loop: loop:
- u: "cleanup_daemon.timer" # Timers...
- u: "ddz.timer"
s: "restarted" s: "restarted"
- u: "cleanup_daemon_@ddz.service" - u: "digas.timer"
- u: "cleanup_daemon_@digas.service" s: "restarted"
- u: "cleanup_daemon_@fotothek.service" - u: "fotothek.timer"
- u: "cleanup_daemon_@mediathek.service" s: "restarted"
- u: "cleanup_daemon_@save.service" - u: "mediathek.timer"
s: "restarted"
- u: "save.timer"
s: "restarted"
# ... and their respective services
- u: "ddz.service"
- u: "digas.service"
- u: "fotothek.service"
- u: "mediathek.service"
- u: "save.service"
changed_when: false changed_when: false
- name: enable & start validation Webservice - name: enable & start validation Webservice
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Description=Cleanup Daemon for Validation Tool (%i) Description=Cleanup Daemon for Validation Tool (%i)
[Timer] [Timer]
Unit=cleanup_daemon_@.service Unit=cleanup_daemon_@%i.service
Persistent=true Persistent=true
OnCalendar=daily OnCalendar=daily
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment