Add DNS resolution check with retries for daemon URL
This commit is contained in:
parent
fd26f1d321
commit
9e0bf394bb
@ -48,6 +48,19 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
ALICE_PK: "{{ alice_pk.stdout }}"
|
ALICE_PK: "{{ alice_pk.stdout }}"
|
||||||
|
|
||||||
|
- name: Check if DNS resolves for daemon
|
||||||
|
command: getent ahosts {{ org_id }}-daemon.{{ full_domain }}
|
||||||
|
register: dns_check
|
||||||
|
retries: 5
|
||||||
|
delay: 5
|
||||||
|
until: dns_check.rc == 0
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: Fail if DNS does not resolve after retries
|
||||||
|
fail:
|
||||||
|
msg: "DNS resolution failed for example.com after 5 retries"
|
||||||
|
when: dns_check.rc != 0
|
||||||
|
|
||||||
- name: Start the laconic console deployment
|
- name: Start the laconic console deployment
|
||||||
command: laconic-so deployment --dir laconic-console-deployment start
|
command: laconic-so deployment --dir laconic-console-deployment start
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user