ansible-role-gitea/handlers/main.yaml
Marius Meyer b0da3ff4a7
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 21s
[FIX] clean up docker_compose_v2 parameters
2024-04-11 14:16:56 +02:00

33 lines
861 B
YAML

- name: Import backup handler
ansible.builtin.import_tasks:
file: backup.yaml
- name: Ensure Gitea is restarted
community.docker.docker_compose_v2:
project_src: /opt/gitea
state: restarted
register: docker_compose
- name: Ensure Gitea is running
community.docker.docker_compose_v2:
project_src: /opt/gitea
register: docker_compose
- name: Get Gitea HTTP response
ansible.builtin.uri:
url: "https://{{ gitea.hostname }}.{{ gitea.domain }}"
register: gitea_http_response
failed_when: 400 <= gitea_http_response.status < 500
- name: Wait until Gitea is up
ansible.builtin.uri:
url: "https://{{ gitea.hostname }}.{{ gitea.domain }}"
register: gitea_http_response
until: gitea_http_response.status == 200
retries: 30
delay: 2
- name: Output docker compose state
ansible.builtin.debug:
var: docker_compose