Skip to content

Commit

Permalink
fixed the problem by adding a new variable to test the connectivity t…
Browse files Browse the repository at this point in the history
…o Elastic
  • Loading branch information
rshad committed Jul 23, 2019
1 parent a588a7c commit 8575aec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions molecule/elasticsearch/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ platforms:
command: /sbin/init
ulimits:
- nofile:262144:262144
# - name: trusty
# image: ubuntu:trusty
# privileged: true
# memory_reservation: 2048m
# ulimits:
# - nofile:262144:262144
#- name: trusty
#image: ubuntu:trusty
#privileged: true
#memory_reservation: 2048m
#ulimits:
#- nofile:262144:262144
- name: centos6
image: centos:6
privileged: true
Expand Down
3 changes: 2 additions & 1 deletion roles/elastic-stack/ansible-elasticsearch/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
elasticsearch_cluster_name: wazuh
elasticsearch_node_name: node-1
elasticsearch_http_port: 9200
elasticsearch_network_host: 127.0.0.1
elasticsearch_network_host: 0.0.0.0
elasticsearch_check_connection: 127.0.0.1
elasticsearch_jvm_xms: null
elastic_stack_version: 7.2.0
single_node: false
Expand Down
2 changes: 1 addition & 1 deletion roles/elastic-stack/ansible-elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
state: started

- name: Make sure Elasticsearch is running before proceeding
wait_for: host={{ elasticsearch_network_host }} port={{ elasticsearch_http_port }} delay=3 timeout=300
wait_for: host={{ elasticsearch_check_connection }} port={{ elasticsearch_http_port }} delay=3 timeout=400
tags:
- configure
- init
Expand Down

0 comments on commit 8575aec

Please sign in to comment.