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
|
- name: Get stats of docker-compose.yaml
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /opt/gitea/docker-compose.yaml
|
path: /opt/gitea/docker-compose.yaml
|
||||||
@ -20,7 +27,7 @@
|
|||||||
- name: Backup Gitea Directory
|
- name: Backup Gitea Directory
|
||||||
ansible.posix.synchronize:
|
ansible.posix.synchronize:
|
||||||
src: /opt/gitea/
|
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
|
recursive: true
|
||||||
delegate_to: "{{ inventory_hostname }}"
|
delegate_to: "{{ inventory_hostname }}"
|
||||||
listen:
|
listen:
|
||||||
|
Loading…
Reference in New Issue
Block a user