homeserver/roles/mgrote_docker_housekeeping/tasks/main.yml

29 lines
589 B
YAML
Raw Normal View History

---
2024-12-30 18:49:38 +01:00
- name: Ensure systemd services are templated
become: true
ansible.builtin.template:
2024-12-30 18:49:38 +01:00
src: "{{ item }}.j2"
dest: /etc/systemd/system/{{ item }}
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
2024-12-30 18:49:38 +01:00
loop:
- docker_housekeeping.service
- docker_housekeeping.timer
- name: Enable Units
become: true
ansible.builtin.systemd_service:
name: "{{ item }}"
enabled: true
masked: false
daemon_reload: true
with_items:
- docker_housekeeping.service
- docker_housekeeping.timer
notify:
- Start timer
...