Compare commits

..

2 Commits

Author SHA1 Message Date
Marius Meyer
d03e1142f2 use docker_compose_v2 module
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 31s
2024-04-10 19:57:47 +02:00
Marius Meyer
fbc2a17011 macos 'date' compatibility 2024-04-10 19:41:22 +02:00
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
- Backup Gitea
- name: Stop Gitea for backup
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: /opt/gitea
state: present
stopped: true
@ -20,7 +20,7 @@
- name: Backup Gitea directory
community.general.archive:
path: /opt/gitea/
dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}.tar.gz"
dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date -u +%Y-%m-%dT%H:%M:%SZ') }}.tar.gz"
force_archive: true
format: gz
owner: root

View File

@ -3,13 +3,13 @@
file: backup.yaml
- name: Ensure Gitea is restarted
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: /opt/gitea
restarted: true
register: docker_compose
- name: Ensure Gitea is running
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: /opt/gitea
register: docker_compose