diff --git a/tasks/install_validation_tools.yml b/tasks/install_validation_tools.yml index eff7bf32ce3fa58f9497158c2509153d8d11685a..75d9fe631d8671d07cda38c8ea4516b37e789388 100644 --- a/tasks/install_validation_tools.yml +++ b/tasks/install_validation_tools.yml @@ -51,25 +51,23 @@ # we place them below "/usr/" instead of "/etc/". - name: create symlinks for validation tool profiles 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 state: "{{ item.state | default('link') }}" + mode: "{{ item.m | default(omit) }}" loop: # 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" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_baseline_SLUB.cfg" d: "cit_tiff6_baseline_SLUB_upcoming.cfg" # 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" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff6_geotiff_SLUB.cfg" d: "cit_tiff6_geotiff_SLUB_upcoming.cfg" # 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" - s: "/usr/share/checkit_tiff_upcoming/example_configs/cit_tiff_retrofotos_SLUB.cfg" d: "cit_tiff_retrofotos_SLUB_upcoming.cfg" @@ -124,7 +122,7 @@ group: "root" loop: - "cleanup_daemon_@.service" - - "cleanup_daemon.timer" + - "cleanup_daemon_@.timer" - "validation_daemon_any@.service" - "validation_daemon_any.socket" - "validation_daemon_@.service" # Daemon service @@ -146,18 +144,28 @@ - name: enable & start cleanup daemon ansible.builtin.systemd: - unit: "{{ item.u }}" + unit: "cleanup_daemon_@{{ item.u }}" daemon_reload: true enabled: true state: "{{ item.s | default(omit) }}" # this can never be idempotent loop: - - u: "cleanup_daemon.timer" + # Timers... + - u: "ddz.timer" s: "restarted" - - u: "cleanup_daemon_@ddz.service" - - u: "cleanup_daemon_@digas.service" - - u: "cleanup_daemon_@fotothek.service" - - u: "cleanup_daemon_@mediathek.service" - - u: "cleanup_daemon_@save.service" + - u: "digas.timer" + s: "restarted" + - u: "fotothek.timer" + s: "restarted" + - 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 - name: enable & start validation Webservice diff --git a/templates/usr/local/lib/systemd/system/cleanup_daemon.timer.j2 b/templates/usr/local/lib/systemd/system/cleanup_daemon_@.timer.j2 similarity index 80% rename from templates/usr/local/lib/systemd/system/cleanup_daemon.timer.j2 rename to templates/usr/local/lib/systemd/system/cleanup_daemon_@.timer.j2 index c8e5e776f059e815a645f0b10d3bbcc542070250..58893d3f14bae7ca860439a86f7127bff7715116 100644 --- a/templates/usr/local/lib/systemd/system/cleanup_daemon.timer.j2 +++ b/templates/usr/local/lib/systemd/system/cleanup_daemon_@.timer.j2 @@ -2,7 +2,7 @@ Description=Cleanup Daemon for Validation Tool (%i) [Timer] -Unit=cleanup_daemon_@.service +Unit=cleanup_daemon_@%i.service Persistent=true OnCalendar=daily