2021-06-19 11:27:06 +02:00
|
|
|
- name: install psutil
|
|
|
|
pip:
|
|
|
|
name: psutil
|
2021-06-19 13:10:59 +02:00
|
|
|
|
2023-03-26 17:05:06 +02:00
|
|
|
- name: "create {{docker_backups_cleanup}}"
|
|
|
|
file:
|
|
|
|
path: "{{docker_backups_cleanup}}"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
|
2021-06-19 13:10:59 +02:00
|
|
|
- name: create backups-cleanup.py
|
2023-03-26 17:05:06 +02:00
|
|
|
template: src=backups-cleanup.py.j2 dest={{docker_backups_cleanup}}backups-cleanup.py
|
2021-06-19 13:10:59 +02:00
|
|
|
|
|
|
|
- name: create backups-cleanup.service
|
2023-03-26 17:05:06 +02:00
|
|
|
template: src=backups-cleanup.service.j2 dest=/etc/systemd/system/backups-cleanup.service
|
2021-06-19 13:10:59 +02:00
|
|
|
notify: restart backups-cleanup.service
|
|
|
|
|
|
|
|
- name: create backups-cleanup.timer
|
|
|
|
copy:
|
|
|
|
src: backups-cleanup.timer
|
|
|
|
dest: "/etc/systemd/system/backups-cleanup.timer"
|
|
|
|
notify: restart backups-cleanup.timer
|