49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
---
|
|
- import_tasks: LocalActions.yml
|
|
|
|
- import_tasks: RedHat.yml
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- name: Configure OpenDistro Elasticsearch JVM memmory.
|
|
template:
|
|
src: "templates/jvm.options.j2"
|
|
dest: /etc/elasticsearch/jvm.options
|
|
owner: root
|
|
group: elasticsearch
|
|
mode: 0644
|
|
force: yes
|
|
notify: restart elasticsearch
|
|
tags: configure
|
|
|
|
# fix in new PR (ignore_errors)
|
|
|
|
- import_tasks: "RMRedHat.yml"
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
- name: Copy Configuration File
|
|
template:
|
|
src: "templates/elasticsearch.yml.j2"
|
|
dest: "{{opendistro_conf_path}}/elasticsearch.yml"
|
|
group: elasticsearch
|
|
mode: 0644
|
|
backup: yes
|
|
register: system_change
|
|
notify: restart elasticsearch
|
|
|
|
- name: Ensure Elasticsearch started and enabled
|
|
service:
|
|
name: elasticsearch
|
|
enabled: true
|
|
state: started
|
|
tags:
|
|
- configure
|
|
- init
|
|
|
|
- name: Make sure Elasticsearch is running before proceeding
|
|
wait_for: host=localhost port=9200 delay=3 timeout=400
|
|
tags:
|
|
- configure
|
|
- init
|
|
|
|
- import_tasks: "RMRedHat.yml"
|
|
when: ansible_os_family == "RedHat" |