computer-playbook/roles/cleanup-disc-space/tasks/main.yml

24 lines
772 B
YAML
Raw Normal View History

2023-11-17 12:35:39 +01:00
- name: "create {{cleanup_disc_space_folder}}"
2023-11-16 17:07:28 +01:00
file:
2023-11-17 12:35:39 +01:00
path: "{{cleanup_disc_space_folder}}"
2023-11-16 17:07:28 +01:00
state: directory
mode: 0755
- name: create cleanup-disc-space.sh
template:
src: cleanup-disc-space.sh.j2
2023-11-17 12:35:39 +01:00
dest: "{{cleanup_disc_space_folder}}cleanup-disc-space.sh"
2023-11-16 17:07:28 +01:00
- name: create cleanup-disc-space.service
template:
src: cleanup-disc-space.service.j2
dest: /etc/systemd/system/cleanup-disc-space.service
notify: reload cleanup-disc-space.service
- name: create cleanup-disc-space.timer
template:
src: cleanup-disc-space.timer.j2
dest: /etc/systemd/system/cleanup-disc-space.timer
register: cleanup_disc_space_timer
changed_when: cleanup_disc_space_timer.changed or activate_all_timers
2023-11-16 17:07:28 +01:00
notify: restart cleanup-disc-space.timer