homeserver/roles/mgrote_docker_housekeeping/tasks/main.yml
Michael Grote d1c18d270a
All checks were successful
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/push/ansible-lint Pipeline was successful
docker: add housekeeping (#105)
Reviewed-on: #105
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-06-05 18:58:28 +02:00

36 lines
774 B
YAML

---
- name: Setup docker housekeeping tasks
become: true
ansible.builtin.template:
src: docker_housekeeping.service.j2
dest: /etc/systemd/system/docker_housekeeping.service
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- name: Setup timer
become: true
ansible.builtin.template:
src: docker_housekeeping.timer.j2
dest: /etc/systemd/system/docker_housekeeping.timer
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- Start timer
- name: Enable Units
become: true
ansible.builtin.systemd:
name: "{{ item }}"
enabled: true
masked: false
with_items:
- docker_housekeeping.service
- docker_housekeeping.timer
notify:
- Start timer
...