Refine task order w/ tags;Fix API check
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Danny Bessems 2022-08-28 09:07:17 +02:00
parent 675dce4160
commit 35b3d5d3b9
5 changed files with 25 additions and 23 deletions

View File

@ -34,6 +34,10 @@
- argo-cd
- kube-system
tags:
- never
- final
- name: Configure step-ca passthrough ingress
ansible.builtin.template:
src: ingressroutetcp.j2
@ -70,6 +74,9 @@
- name: LEGO_CA_CERTIFICATES
value: /step-ca/root_ca.crt
marker: ' # {mark} ANSIBLE MANAGED BLOCK'
tags:
- never
- final
notify:
- Apply manifests

View File

@ -36,15 +36,11 @@
ansible.builtin.meta: flush_handlers
- name: Ensure gitea API availability
ansible.utils.cli_parse:
# Available from Gitea 1.17.x
# command: curl -k https://git.{{ vapp['metacluster.fqdn'] }}/api/healtz
command: curl -k https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/version
parser:
name: ansible.utils.json
set_fact: api_readycheck
ignore_errors:
until: api_readycheck.version is defined
ansible.builtin.uri:
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/healtz
method: GET
register: api_readycheck
until: api_readycheck.json.status | default(false) | bool
retries: 3
delay: 30

View File

@ -11,13 +11,11 @@
values: "{{ components.argocd.chart_values }}"
- name: Ensure argo-cd API availability
ansible.utils.cli_parse:
command: curl -k https://gitops.{{ vapp['metacluster.fqdn'] }}/api/version
parser:
name: ansible.utils.json
set_fact: api_readycheck
ignore_errors:
until: api_readycheck.Version is defined
ansible.builtin.uri:
url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/version
method: GET
register: api_readycheck
until: api_readycheck.json.Version | default(false) | bool
retries: 3
delay: 30

View File

@ -12,13 +12,11 @@
when: ansible_facts.services['k3s.service'] is undefined
- name: Ensure API availability
ansible.utils.cli_parse:
command: curl -k https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
parser:
name: ansible.utils.json
set_fact: api_readycheck
ignore_errors: yes
until: api_readycheck.apiVersion is defined
ansible.builtin.uri:
url: https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
method: GET
register: api_readycheck
until: api_readycheck.json.apiVersion | default(false) | bool
retries: 3
delay: 30

View File

@ -6,4 +6,7 @@
- import_tasks: registry.yml
- import_tasks: git.yml
- import_tasks: gitops.yml
- import_tasks: certauthority.yml
tags: final
- import_tasks: cleanup.yml