agaric-coop/box/provisioning/roles/geerlingguy.elasticsearch/tasks/main.yml

21 lines
602 B
YAML

---
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include: setup-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: 0750
notify: restart elasticsearch
- name: Start Elasticsearch.
service: name=elasticsearch state=started enabled=yes
- name: Make sure Elasticsearch is running before proceeding.
wait_for: host={{ elasticsearch_network_host }} port={{ elasticsearch_http_port }} delay=3 timeout=300