Implemented cleaning up of all backups

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-02 08:28:00 +01:00
parent 4c6d57c4e0
commit d3628d90b9
2 changed files with 11 additions and 2 deletions

View File

@ -5,4 +5,4 @@ OnFailure=systemd-notifier@%n.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bash {{backup_docker_to_local_cleanup_folder}}cleanup.sh {{backup_docker_to_local_cleanup_machine_id}} {{backup_docker_to_local_cleanup_trigger_directory}}' ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bash {{backup_docker_to_local_cleanup_folder}}cleanup-all.sh {{backup_docker_to_local_cleanup_trigger_directory}}'

View File

@ -8,7 +8,16 @@
ssh_key_type: rsa ssh_key_type: rsa
ssh_key_bits: 8192 ssh_key_bits: 8192
when: run_once_user_administrator is not defined when: run_once_user_administrator is not defined
- name: "set correct rights for {{path_administrator_home}}"
file:
path: "{{path_administrator_home}}"
state: directory
owner: administrator
group: administrator
mode: 0700
when: run_once_user_administrator is not defined
- name: "create {{path_administrator_scripts}}" - name: "create {{path_administrator_scripts}}"
file: file:
path: "{{path_administrator_home}}scripts" path: "{{path_administrator_home}}scripts"