39 lines
834 B
YAML
39 lines
834 B
YAML
---
|
|
- include: RedHat.yml
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- include: Debian.yml
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Configure Elasticsearch.
|
|
template:
|
|
src: elasticsearch.yml.j2
|
|
dest: /etc/elasticsearch/elasticsearch.yml
|
|
owner: root
|
|
group: elasticsearch
|
|
mode: 0660
|
|
notify: restart elasticsearch
|
|
tags: configure
|
|
|
|
- name: Configure Elasticsearch JVM memmory.
|
|
template:
|
|
src: jvm.options.j2
|
|
dest: /etc/elasticsearch/jvm.options
|
|
owner: root
|
|
group: elasticsearch
|
|
mode: 0660
|
|
notify: restart elasticsearch
|
|
tags: configure
|
|
|
|
- name: Ensure Elasticsearch started and enabled
|
|
service:
|
|
name: elasticsearch
|
|
enabled: yes
|
|
state: started
|
|
|
|
- include: "RMRedHat.yml"
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
- include: "RMDebian.yml"
|
|
when: ansible_os_family == "Debian"
|