computer-playbook/roles/backup-remote-to-local/tasks/main.yml

29 lines
1.0 KiB
YAML
Raw Normal View History

2023-11-17 12:35:39 +01:00
- name: "create {{docker_backup_remote_to_local_folder}}"
2023-11-16 17:55:54 +01:00
file:
2023-11-17 12:35:39 +01:00
path: "{{docker_backup_remote_to_local_folder}}"
2023-11-16 17:55:54 +01:00
state: directory
mode: 0755
- name: create backup-remote-to-local.sh
copy:
src: backup-remote-to-local.sh
2023-11-17 12:35:39 +01:00
dest: "{{docker_backup_remote_to_local_folder}}backup-remote-to-local.sh"
2023-11-16 17:55:54 +01:00
mode: 0755
- name: create backup-remote-to-local.service
template: src=backup-remote-to-local.service.j2 dest=/etc/systemd/system/backup-remote-to-local.service
notify: reload backup-remote-to-local service
- name: create backup-remote-to-local.timer
template: src=backup-remote-to-local.timer.j2 dest=/etc/systemd/system/backup-remote-to-local.timer
2023-11-17 12:35:39 +01:00
register: backup_backup_remote_to_local_timer
2023-12-15 13:27:23 +01:00
changed_when: backup_backup_remote_to_local_timer.changed or activate_all_timers | bool
2023-11-16 17:55:54 +01:00
notify: restart backup-remote-to-local timer
2023-11-17 23:34:50 +01:00
- name: create backups-remote-to-local.sh
2023-11-16 17:55:54 +01:00
template:
2023-11-17 23:34:50 +01:00
src: backups-remote-to-local.sh.j2
dest: "{{docker_backup_remote_to_local_folder}}backups-remote-to-local.sh"
2023-11-16 17:55:54 +01:00
mode: 0755