ansible-role-elasticsearch/tasks/config.yml

21 lines
494 B
YAML

---
- name: set heap size
lineinfile:
path: /etc/elasticsearch/jvm.options
regexp: '^-{{ item }}'
line: '-{{ item }}{{ elasticsearch_heap_size }}'
loop:
- Xms
- Xmx
notify: restart elasticsearch
tags: elasticsearch
- name: copy config file
copy:
content: '{{ elasticsearch_full_config|to_nice_yaml }}'
dest: /etc/elasticsearch/elasticsearch.yml
owner: root
group: elasticsearch
mode: 0640
notify: restart elasticsearch
tags: elasticsearch