set up cronjob and timer

This commit is contained in:
2024-12-30 13:19:45 +01:00
parent cf62dcc707
commit 07a9f4bf4d
6 changed files with 51 additions and 5 deletions

View File

@@ -66,3 +66,11 @@
group: "82"
mode: '0766'
state: directory
# racing condition: on first execution, this is not available...
#
# - name: Ensure systemd timer for cronjob is up
# ansible.builtin.systemd_service:
# name: "chill-cronjob@{{ item['chill_environment'] }}.timer"
# state: restarted
# enabled: true

View File

@@ -40,6 +40,20 @@
- name: Install traefik
ansible.builtin.include_tasks: traefik.yml
- name: Install systemd services
ansible.builtin.template:
src: "systemd/{{ file }}"
dest: "/etc/systemd/system/{{ file }}"
owner: root
group: root
mode: '0766'
notify: Reload systemd
loop:
- chill-cronjob@.service
- chill-cronjob@.timer
loop_control:
loop_var: file
- name: Install individual chill
ansible.builtin.include_tasks: chill/main.yml
with_items: "{{ chills }}"