From e057f313ea9e677ad853c638d190c7041aa0b4aa Mon Sep 17 00:00:00 2001 From: djpbessems Date: Sat, 15 Jun 2024 19:47:44 +1000 Subject: [PATCH] chore: Ensure api availability --- .../bootstrap/roles/metacluster/tasks/workflow.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/workflow.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/workflow.yml index efa88d6..d19a622 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/workflow.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/workflow.yml @@ -37,8 +37,15 @@ kubeconfig: "{{ kubeconfig.path }}" values: "{{ components['argo-workflows'].chart_values }}" - # - name: Trigger handlers - # ansible.builtin.meta: flush_handlers + - name: Ensure argo workflows API availability + ansible.builtin.uri: + url: https://workflow.{{ vapp['metacluster.fqdn'] }}/api/v1/version + method: GET + register: api_readycheck + until: + - api_readycheck.json.version is defined + retries: "{{ playbook.retries }}" + delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}" module_defaults: ansible.builtin.uri: