Skip to content

Commit df47205

Browse files
Fix/pipelines fix (#260)
Fix #256 Fix #257 Fix #257
1 parent c3eab15 commit df47205

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed

molecule/elasticstack_default/converge.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@
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

molecule/elasticstack_default/molecule.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dependency:
44
driver:
55
name: docker
66
platforms:
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

roles/elasticsearch/tasks/elasticsearch-security.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
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
@@ -551,15 +551,6 @@
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;

roles/elasticsearch/tasks/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,21 @@
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:
@@ -186,7 +201,6 @@
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

0 commit comments

Comments
 (0)