Skip to content

Commit

Permalink
* Remove cache after all roles run (#271)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
afeefghannam89 authored Sep 10, 2023
1 parent 59b9aef commit 96c04c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions molecule/elasticstack_default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
- name: Install rsyslog
ansible.builtin.package:
name: rsyslog
- name: Remove cache # noqa: risky-shell-pipe
ansible.builtin.shell: >
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
rm -rf /var/cache/*
changed_when: false
- name: Configure rsyslog
ansible.builtin.lineinfile:
line: "*.* @@localhost:514"
Expand Down
1 change: 0 additions & 1 deletion roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
ansible.builtin.shell: >
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
rm -rf /var/cache/*
failed_when: false
changed_when: false
when: ansible_virtualization_type == "container" or ansible_virtualization_type == "docker"

Expand Down

0 comments on commit 96c04c0

Please sign in to comment.