verschiebe Gitea start und Erreichbarkeitscheck
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
This commit is contained in:
parent
b52f8767f6
commit
e4d723ed30
@ -3,4 +3,4 @@
|
|||||||
# Warnungen und Fehler von ansible-lint ignoriert werden.
|
# Warnungen und Fehler von ansible-lint ignoriert werden.
|
||||||
|
|
||||||
tasks/main.yaml no-handler # Der Restart / Recreate Gitea Task ist gut dort, wo er ist
|
tasks/main.yaml no-handler # Der Restart / Recreate Gitea Task ist gut dort, wo er ist
|
||||||
tasks/main.yaml name[template] # Es braucht zwei Templates, um den FQDN zusammenzusetzen.
|
tasks/start.yaml name[template] # Es braucht zwei Templates, um den FQDN zusammenzusetzen.
|
||||||
|
@ -74,21 +74,9 @@
|
|||||||
mode: "600"
|
mode: "600"
|
||||||
register: gitea_container
|
register: gitea_container
|
||||||
|
|
||||||
- name: Start Gitea
|
- name: Start Gitea and try reaching it
|
||||||
community.docker.docker_compose:
|
ansible.builtin.include_tasks:
|
||||||
project_src: /opt/gitea
|
file: start.yaml
|
||||||
register: docker_compose
|
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
|
||||||
var: docker_compose
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Stop Gitea for Backup
|
- name: Stop Gitea for Backup
|
||||||
@ -104,17 +92,10 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
mode: "700"
|
mode: "700"
|
||||||
|
|
||||||
- name: Create / Recreate Gitea
|
- name: Start Gitea and try reaching it
|
||||||
community.docker.docker_compose:
|
ansible.builtin.include_tasks:
|
||||||
project_src: /opt/gitea
|
file: start.yaml
|
||||||
state: present
|
|
||||||
restarted: true
|
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Check if {{ gitea.hostname }}.{{ gitea.domain }} is available and returning status 200
|
- ansible.builtin.debug:
|
||||||
ansible.builtin.uri:
|
var: docker_compose
|
||||||
url: "https://{{ gitea.hostname }}.{{ gitea.domain }}"
|
|
||||||
register: _result
|
|
||||||
until: _result.status == 200
|
|
||||||
retries: 30
|
|
||||||
delay: 2
|
|
||||||
|
12
tasks/start.yaml
Normal file
12
tasks/start.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
- name: Start Gitea
|
||||||
|
community.docker.docker_compose:
|
||||||
|
project_src: /opt/gitea
|
||||||
|
register: docker_compose
|
||||||
|
|
||||||
|
- 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
|
Loading…
Reference in New Issue
Block a user