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 28
28
ansible.builtin.set_fact :
29
29
elasticstack_rpm_workaround : true
30
30
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
41
31
- name : Include Redis
42
32
ansible.builtin.include_role :
43
33
name : geerlingguy.redis
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ dependency:
4
4
driver :
5
5
name : docker
6
6
platforms :
7
- - name : elasticstack-cluster1
7
+ - name : " elasticstack${ELASTIC_RELEASE} -cluster1-${MOLECULE_DISTRO} "
8
8
groups :
9
9
- beats
10
10
- logstash
@@ -17,7 +17,7 @@ platforms:
17
17
cgroupns_mode : host
18
18
privileged : true
19
19
pre_build_image : true
20
- - name : elasticstack-cluster2
20
+ - name : " elasticstack${ELASTIC_RELEASE} -cluster2-${MOLECULE_DISTRO} "
21
21
groups :
22
22
- beats
23
23
- logstash
Original file line number Diff line number Diff line change 519
519
ansible.builtin.service :
520
520
name : elasticsearch
521
521
state : started
522
- failed_when : false
522
+ enabled : yes
523
523
524
524
- name : Wait for all instances to start
525
525
ansible.builtin.include_tasks : wait_for_instance.yml
551
551
elasticsearch_http_protocol : " https"
552
552
when : elasticsearch_http_security
553
553
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
-
563
554
- name : Check for cluster status with bootstrap password # noqa: risky-shell-pipe
564
555
ansible.builtin.shell : >
565
556
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
Original file line number Diff line number Diff line change 171
171
force : yes
172
172
notify : Restart Elasticsearch
173
173
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
+
174
189
- name : Import Tasks elasticsearch-security.yml
175
190
ansible.builtin.import_tasks : elasticsearch-security.yml
176
191
when :
186
201
name : elasticsearch
187
202
state : started
188
203
enabled : yes
189
- failed_when : false
190
204
191
205
- name : Handle cluster setup without security
192
206
when : not elasticsearch_security | bool
You can’t perform that action at this time.
0 commit comments