mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Another big round of refactoring and cleaning...
This commit is contained in:
32
roles/sys-cln-bkps-service/tasks/main.yml
Normal file
32
roles/sys-cln-bkps-service/tasks/main.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
- name: install lsof and python-psutil
|
||||
community.general.pacman:
|
||||
name:
|
||||
- lsof
|
||||
- python-psutil
|
||||
state: present
|
||||
when: run_once_cleanup_backups_service is not defined
|
||||
|
||||
- name: "create {{cleanup_backups_directory}}"
|
||||
file:
|
||||
path: "{{cleanup_backups_directory}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: run_once_cleanup_backups_service is not defined
|
||||
|
||||
- name: create sys-cln-backups.py
|
||||
copy:
|
||||
src: "sys-cln-backups.py"
|
||||
dest: "{{cleanup_backups_directory}}sys-cln-backups.py"
|
||||
when: run_once_cleanup_backups_service is not defined
|
||||
|
||||
- name: create sys-cln-backups.cymais.service
|
||||
template:
|
||||
src: "sys-cln-backups.service.j2"
|
||||
dest: "/etc/systemd/system/sys-cln-backups.cymais.service"
|
||||
notify: reload sys-cln-backups.cymais.service
|
||||
when: run_once_cleanup_backups_service is not defined
|
||||
|
||||
- name: run the cleanup_backups_service tasks once
|
||||
set_fact:
|
||||
run_once_cleanup_backups_service: true
|
||||
when: run_once_cleanup_backups_service is not defined
|
Reference in New Issue
Block a user