Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions molecule/elasticstack_default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
ansible.builtin.set_fact:
elasticstack_rpm_workaround: true
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version >= "9"
- name: Update apt cache.
ansible.builtin.apt:
update_cache: yes
cache_valid_time: 600
changed_when: false
when: ansible_os_family == 'Debian'
- name: Install dependencies
ansible.builtin.package:
name:
- curl
- name: Include Redis
ansible.builtin.include_role:
name: geerlingguy.redis
Expand Down
4 changes: 2 additions & 2 deletions molecule/elasticstack_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependency:
driver:
name: docker
platforms:
- name: elasticstack-cluster1
- name: "elasticstack${ELASTIC_RELEASE}-cluster1-${MOLECULE_DISTRO}"
groups:
- beats
- logstash
Expand All @@ -17,7 +17,7 @@ platforms:
cgroupns_mode: host
privileged: true
pre_build_image: true
- name: elasticstack-cluster2
- name: "elasticstack${ELASTIC_RELEASE}-cluster2-${MOLECULE_DISTRO}"
groups:
- beats
- logstash
Expand Down
11 changes: 1 addition & 10 deletions roles/elasticsearch/tasks/elasticsearch-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
ansible.builtin.service:
name: elasticsearch
state: started
failed_when: false
enabled: yes

- name: Wait for all instances to start
ansible.builtin.include_tasks: wait_for_instance.yml
Expand Down Expand Up @@ -551,15 +551,6 @@
elasticsearch_http_protocol: "https"
when: elasticsearch_http_security

# Free up some space to let elsticsearch allocate replica in GitHub Action
- 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/*
failed_when: false
changed_when: false
when: ansible_virtualization_type == "container"

- name: Check for cluster status with bootstrap password # noqa: risky-shell-pipe
ansible.builtin.shell: >
if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi;
Expand Down
16 changes: 15 additions & 1 deletion roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,21 @@
force: yes
notify: Restart Elasticsearch

# On containerized Debian 10 systemd will not recognize elasticsearch service
- name: Force systemd to reread configs on container
ansible.builtin.systemd:
daemon_reload: true
when: ansible_virtualization_type == "container"

# Free up some space to let elsticsearch allocate replica in GitHub Action
- 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/*
failed_when: false
changed_when: false
when: ansible_virtualization_type == "container"

- name: Import Tasks elasticsearch-security.yml
ansible.builtin.import_tasks: elasticsearch-security.yml
when:
Expand All @@ -186,7 +201,6 @@
name: elasticsearch
state: started
enabled: yes
failed_when: false

- name: Handle cluster setup without security
when: not elasticsearch_security | bool
Expand Down