2024-06-05 18:58:28 +02:00
|
|
|
---
|
2024-12-30 20:06:25 +01:00
|
|
|
- name: Ensure systemd services are templated
|
2024-06-05 18:58:28 +02:00
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
2024-12-30 20:06:25 +01:00
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: /etc/systemd/system/{{ item }}
|
2024-06-05 18:58:28 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify:
|
|
|
|
- systemctl daemon-reload
|
2024-12-30 20:06:25 +01:00
|
|
|
loop:
|
|
|
|
- docker_housekeeping.service
|
|
|
|
- docker_housekeeping.timer
|
2024-06-05 18:58:28 +02:00
|
|
|
|
|
|
|
- name: Enable Units
|
|
|
|
become: true
|
2024-09-16 16:42:46 +02:00
|
|
|
ansible.builtin.systemd_service:
|
2024-06-05 18:58:28 +02:00
|
|
|
name: "{{ item }}"
|
|
|
|
enabled: true
|
|
|
|
masked: false
|
2024-09-16 16:42:46 +02:00
|
|
|
daemon_reload: true
|
2024-06-05 18:58:28 +02:00
|
|
|
with_items:
|
|
|
|
- docker_housekeeping.service
|
|
|
|
- docker_housekeeping.timer
|
|
|
|
notify:
|
|
|
|
- Start timer
|
|
|
|
...
|