Skip to content

Commit 96c04c0

Browse files
* Remove cache after all roles run (#271)
We should free up space after the roles run to have green cluster state in impotence step and enable Elasticsearch to allocate all indices. Close #272
1 parent 59b9aef commit 96c04c0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

molecule/elasticstack_default/converge.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
- name: Install rsyslog
5252
ansible.builtin.package:
5353
name: rsyslog
54+
- name: Remove cache # noqa: risky-shell-pipe
55+
ansible.builtin.shell: >
56+
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
57+
rm -rf /var/cache/*
58+
changed_when: false
5459
- name: Configure rsyslog
5560
ansible.builtin.lineinfile:
5661
line: "*.* @@localhost:514"

roles/elasticsearch/tasks/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@
182182
ansible.builtin.shell: >
183183
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
184184
rm -rf /var/cache/*
185-
failed_when: false
186185
changed_when: false
187186
when: ansible_virtualization_type == "container" or ansible_virtualization_type == "docker"
188187

0 commit comments

Comments
 (0)