Merge experimental nach main #3

Merged
sporq merged 16 commits from experimental into main 2023-05-01 18:37:47 +02:00
2 changed files with 24 additions and 21 deletions
Showing only changes of commit 124456ae07 - Show all commits

21
handlers/backup.yaml Normal file
View File

@ -0,0 +1,21 @@
- name: Stop Gitea for Backup
community.docker.docker_compose:
project_src: /opt/gitea
state: present
stopped: true
ignore_errors: true
listen:
- Backup Gitea
notify:
- Ensure Gitea is running
- name: Backup Gitea Directory
ansible.builtin.copy:
src: /opt/gitea/
dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}"
mode: preserve
remote_src: true
directory_mode: true
listen:
- Backup Gitea
register: backup

View File

@ -1,24 +1,6 @@
- name: Stop Gitea for Backup - name: Import Backup Handler
community.docker.docker_compose: ansible.builtin.import_tasks:
project_src: /opt/gitea file: backup.yaml
state: present
stopped: true
ignore_errors: true
listen:
- Backup Gitea
notify:
- Ensure Gitea is running
- name: Backup Gitea Directory
ansible.builtin.copy:
src: /opt/gitea/
dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}"
mode: preserve
remote_src: true
directory_mode: true
listen:
- Backup Gitea
register: backup
- name: Ensure Gitea is restarted - name: Ensure Gitea is restarted
community.docker.docker_compose: community.docker.docker_compose: