From 614746b59e6a1af59f453703037452307d5444fe Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 27 May 2025 11:00:22 +0200 Subject: webmap-update@.timer: Add ability to adjust calendar events for individual template units. Via group variables. For instance mineralrattigheter.zip is updated daily at 04:33 CEST, so we trigger the units after that to avoid being off by a day. (Also that particular unit runs relatively fast and should have terminated by the start of office hours.) --- tasks/webmap.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tasks') diff --git a/tasks/webmap.yml b/tasks/webmap.yml index d694387..de320d4 100644 --- a/tasks/webmap.yml +++ b/tasks/webmap.yml @@ -69,6 +69,22 @@ notify: - systemctl daemon-reload +- name: Create directory /etc/systemd/system/webmap-update@*.timer.d + file: path=/etc/systemd/system/webmap-update@{{ item }}.timer.d + state=directory + owner=root group=root + mode=0755 + with_items: "{{ webmap_layer_groups_update_calendar.keys() | list }}" + +- name: Copy /etc/systemd/system/webmap-update@*.timer.d/override.conf + template: src=etc/systemd/system/webmap-update@.timer.d/override.conf.j2 + dest=/etc/systemd/system/webmap-update@{{ item }}.timer.d/override.conf + owner=root group=root + mode=0644 + with_items: "{{ webmap_layer_groups_update_calendar.keys() | list }}" + notify: + - systemctl daemon-reload + - name: Enable webmap-update.timer service: name=webmap-update@{{ item }}.timer state=started enabled=true with_items: "{{ webmap_layer_groups }}" -- cgit v1.2.3