fix: fall back to localhost when api_endpoint is unreachable (#558)

Signed-off-by: Mustafa Bell <63203400+MooseStack@users.noreply.github.com>
This commit is contained in:
Mustafa authored and GitHub committed 2026-10-07 13:51:43 -07:00
1 parent 3693646fce
commit 6b1d898518
1 file changed
+11 -1
+11 -1
View File
@@ -334,11 +334,21 @@
changed_when: false changed_when: false
- name: Wait for control plane to be ready - name: Wait for control plane to be ready
run_once: true
block:
- name: Wait for control plane using api_endpoint
ansible.builtin.wait_for: ansible.builtin.wait_for:
host: "{{ api_endpoint }}" host: "{{ api_endpoint }}"
port: "{{ api_port }}" port: "{{ api_port }}"
timeout: 60 timeout: 60
run_once: true changed_when: false
rescue:
- name: Wait for control plane using localhost
ansible.builtin.wait_for:
host: localhost
port: "{{ api_port }}"
timeout: 60
changed_when: false changed_when: false
- name: Wait for the servers started so far to be etcd voters - name: Wait for the servers started so far to be etcd voters