Backup nach /var/backups
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 11s
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 11s
This commit is contained in:
parent
657b771790
commit
305a7a7f67
@ -1,3 +1,10 @@
|
||||
- name: Ensure backup directory exists
|
||||
ansible.builtin.file:
|
||||
path: "/var/backups"
|
||||
state: directory
|
||||
owner: root
|
||||
mode: "755"
|
||||
|
||||
- name: Get stats of docker-compose.yaml
|
||||
ansible.builtin.stat:
|
||||
path: /opt/gitea/docker-compose.yaml
|
||||
@ -20,7 +27,7 @@
|
||||
- name: Backup Gitea Directory
|
||||
ansible.posix.synchronize:
|
||||
src: /opt/gitea/
|
||||
dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}"
|
||||
dest: "/var/backups/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}"
|
||||
recursive: true
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
listen:
|
||||
|
Loading…
Reference in New Issue
Block a user