File tree Expand file tree Collapse file tree 4 files changed +18
-23
lines changed
molecule/elasticstack_default
roles/elasticsearch/tasks Expand file tree Collapse file tree 4 files changed +18
-23
lines changed Original file line number Diff line number Diff line change 2828 ansible.builtin.set_fact :
2929 elasticstack_rpm_workaround : true
3030 when : ansible_os_family == 'RedHat' and ansible_distribution_major_version >= "9"
31- - name : Update apt cache.
32- ansible.builtin.apt :
33- update_cache : yes
34- cache_valid_time : 600
35- changed_when : false
36- when : ansible_os_family == 'Debian'
37- - name : Install dependencies
38- ansible.builtin.package :
39- name :
40- - curl
4131 - name : Include Redis
4232 ansible.builtin.include_role :
4333 name : geerlingguy.redis
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ dependency:
44driver :
55 name : docker
66platforms :
7- - name : elasticstack-cluster1
7+ - name : " elasticstack${ELASTIC_RELEASE} -cluster1-${MOLECULE_DISTRO} "
88 groups :
99 - beats
1010 - logstash
@@ -17,7 +17,7 @@ platforms:
1717 cgroupns_mode : host
1818 privileged : true
1919 pre_build_image : true
20- - name : elasticstack-cluster2
20+ - name : " elasticstack${ELASTIC_RELEASE} -cluster2-${MOLECULE_DISTRO} "
2121 groups :
2222 - beats
2323 - logstash
Original file line number Diff line number Diff line change 519519 ansible.builtin.service :
520520 name : elasticsearch
521521 state : started
522- failed_when : false
522+ enabled : yes
523523
524524- name : Wait for all instances to start
525525 ansible.builtin.include_tasks : wait_for_instance.yml
551551 elasticsearch_http_protocol : " https"
552552 when : elasticsearch_http_security
553553
554- # Free up some space to let elsticsearch allocate replica in GitHub Action
555- - name : Remove cache # noqa: risky-shell-pipe
556- ansible.builtin.shell : >
557- if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
558- rm -rf /var/cache/*
559- failed_when : false
560- changed_when : false
561- when : ansible_virtualization_type == "container"
562-
563554- name : Check for cluster status with bootstrap password # noqa: risky-shell-pipe
564555 ansible.builtin.shell : >
565556 if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
Original file line number Diff line number Diff line change 171171 force : yes
172172 notify : Restart Elasticsearch
173173
174+ # On containerized Debian 10 systemd will not recognize elasticsearch service
175+ - name : Force systemd to reread configs on container
176+ ansible.builtin.systemd :
177+ daemon_reload : true
178+ when : ansible_virtualization_type == "container"
179+
180+ # Free up some space to let elsticsearch allocate replica in GitHub Action
181+ - name : Remove cache # noqa: risky-shell-pipe
182+ ansible.builtin.shell : >
183+ if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
184+ rm -rf /var/cache/*
185+ failed_when : false
186+ changed_when : false
187+ when : ansible_virtualization_type == "container"
188+
174189- name : Import Tasks elasticsearch-security.yml
175190 ansible.builtin.import_tasks : elasticsearch-security.yml
176191 when :
186201 name : elasticsearch
187202 state : started
188203 enabled : yes
189- failed_when : false
190204
191205- name : Handle cluster setup without security
192206 when : not elasticsearch_security | bool
You can’t perform that action at this time.
0 commit comments