42 lines
886 B
YAML
42 lines
886 B
YAML
- name: ensure java is installed
|
|
package:
|
|
name=java-1.8.0-openjdk-headless
|
|
state=present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure elasticsearch package repository is available
|
|
template:
|
|
src=elasticsearch.repo.j2
|
|
dest=/etc/yum.repos.d/elasticsearch.repo
|
|
mode=0644
|
|
tags:
|
|
- install
|
|
|
|
- name: Ensure elasticsearch is installed
|
|
package:
|
|
name: 'elasticsearch'
|
|
state: present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure elasticsearch logging is configured
|
|
template:
|
|
src=log4j2.properties.j2
|
|
dest=/etc/elasticsearch/log4j2.properties
|
|
mode=0640
|
|
owner=root
|
|
group=elasticsearch
|
|
|
|
- name: ensure elasticsearch jvm options are set
|
|
template:
|
|
src=jvm.options.j2
|
|
dest=/etc/elasticsearch/jvm.options
|
|
mode=0644
|
|
notify: restart elasticsearch
|
|
|
|
- name: ensure elasticsearch server starts at boot
|
|
service:
|
|
name=elasticsearch
|
|
enabled=yes
|