Skip to content

Commit 59a4354

Browse files
wait for port to be open instead of hard-coded 10 seconds (#123) (#128)
* wait for port to be open instead of hard-coded 10 seconds * use ansible.builtin.wait_for * add timeout=120 for ansible.builtin.wait_for --------- Signed-off-by: Florian Heiderich <[email protected]> Signed-off-by: Peter Zhu <[email protected]> Co-authored-by: Florian Heiderich <[email protected]>
1 parent c8ff034 commit 59a4354

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

roles/linux/opensearch/tasks/security.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,10 @@
190190
state: restarted
191191
enabled: yes
192192

193-
- name: Pause for 10 seconds to provide sometime for OpenSearch start
194-
pause:
195-
seconds: 10
193+
- name: Wait for opensearch to startup
194+
ansible.builtin.wait_for: host={{ hostvars[inventory_hostname]['ip'] }} port={{os_api_port}} delay=5 connect_timeout=1 timeout=120
195+
196+
196197

197198
- name: Security Plugin configuration | Copy the opensearch security internal users template
198199
template:

0 commit comments

Comments
 (0)