2023-05-01 22:38:08 +02:00
|
|
|
- name: Import backup handler
|
2023-05-01 01:48:07 +02:00
|
|
|
ansible.builtin.import_tasks:
|
|
|
|
file: backup.yaml
|
2023-04-29 21:52:00 +02:00
|
|
|
|
2023-04-29 22:22:03 +02:00
|
|
|
- name: Ensure Gitea is restarted
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: /opt/gitea
|
|
|
|
restarted: true
|
2023-05-01 01:59:58 +02:00
|
|
|
register: docker_compose
|
2023-04-29 22:22:03 +02:00
|
|
|
|
2023-04-29 20:37:01 +02:00
|
|
|
- name: Ensure Gitea is running
|
2023-04-29 16:56:41 +02:00
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: /opt/gitea
|
2023-05-01 01:59:58 +02:00
|
|
|
register: docker_compose
|
2023-04-29 16:56:41 +02:00
|
|
|
|
2023-05-01 22:38:08 +02:00
|
|
|
- name: Get Gitea HTTP response
|
2023-04-29 16:56:41 +02:00
|
|
|
ansible.builtin.uri:
|
|
|
|
url: "https://{{ gitea.hostname }}.{{ gitea.domain }}"
|
2023-05-01 02:02:56 +02:00
|
|
|
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
|
2023-04-29 16:56:41 +02:00
|
|
|
retries: 30
|
|
|
|
delay: 2
|
2023-04-29 20:37:01 +02:00
|
|
|
|
2023-05-01 22:38:08 +02:00
|
|
|
- name: Output docker compose state
|
2023-04-29 20:37:01 +02:00
|
|
|
ansible.builtin.debug:
|
|
|
|
var: docker_compose
|