[FIX] Starte Gitea neu, wenn die Config geändert wurde

This commit is contained in:
Marius Alwan Meyer 2023-04-29 20:22:03 +00:00
parent 6817fe0ff9
commit e8e05f8391
2 changed files with 13 additions and 13 deletions

View File

@ -20,6 +20,11 @@
- Backup Gitea
register: backup
- name: Ensure Gitea is restarted
community.docker.docker_compose:
project_src: /opt/gitea
restarted: true
- name: Ensure Gitea is running
community.docker.docker_compose:
project_src: /opt/gitea

View File

@ -70,6 +70,9 @@
dest: "/opt/gitea/environment.env"
owner: root
mode: "600"
notify:
- Ensure Gitea is restarted
- Check Gitea HTTP Response
- name: Upload docker-compose.yaml
ansible.builtin.template:
@ -79,21 +82,13 @@
mode: "600"
notify:
- Output Docker Compose State
- Ensure Gitea is restarted
- Check Gitea HTTP Response
- name: Try to start and reach Gitea
- name: Update Config
block:
- name: Start Gitea
community.docker.docker_compose:
project_src: /opt/gitea
- name: Check if {{ gitea.hostname }}.{{ gitea.domain }} is available and returning status 200
ansible.builtin.uri:
url: "https://{{ gitea.hostname }}.{{ gitea.domain }}"
register: _result
until: _result.status == 200
retries: 30
delay: 2
- name:
meta: flush_handlers
rescue:
- name: Stop Gitea for Backup