Ensure API availability
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-11-29 14:48:19 +01:00
parent a20cb4417c
commit 96ee96b470

View File

@ -44,8 +44,22 @@
dest: /etc/rancher/k3s/registries.yaml
src: registries.j2
- name: Restart kubelet (k3s) to pick up configured registries
ansible.builtin.systemd:
name: k3s
state: restarted
- name: Ensure k3s API availability
ansible.builtin.uri:
url: https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
method: GET
register: api_readycheck
until: api_readycheck.json.apiVersion is defined
retries: 5
delay: 30
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
status_code: [200, 201, 401]
body_format: json