28 lines
589 B
YAML
28 lines
589 B
YAML
---
|
|
- name: Ensure systemd services are templated
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: "{{ item }}.j2"
|
|
dest: /etc/systemd/system/{{ item }}
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify:
|
|
- systemctl daemon-reload
|
|
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
|
|
...
|