2019-05-01 15:21:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
- name: Add Elastic repo
|
|
|
|
include: install-repo.yml
|
|
|
|
|
|
|
|
- name: Install ElasticSearch from apt
|
|
|
|
become: true
|
|
|
|
apt:
|
2019-05-01 16:05:54 -07:00
|
|
|
name: filebeat
|
2019-05-01 15:21:32 -07:00
|
|
|
|
|
|
|
- name: Update config
|
|
|
|
become: true
|
|
|
|
template:
|
2019-05-01 16:05:54 -07:00
|
|
|
src: filebeat.j2
|
|
|
|
dest: /etc/filebeat/filebeat.yml
|
2019-05-01 15:21:32 -07:00
|
|
|
backup: yes
|
|
|
|
|
|
|
|
- name: systemd enable elasticsearch
|
|
|
|
become: true
|
|
|
|
when: systemd_enabled == true
|
|
|
|
systemd:
|
2019-05-01 16:05:54 -07:00
|
|
|
name: filebeat
|
2019-05-01 15:21:32 -07:00
|
|
|
enabled: true
|
|
|
|
|
|
|
|
- name: systemd restart elasticsearch
|
|
|
|
become: true
|
|
|
|
when: systemd_restart == true
|
|
|
|
systemd:
|
2019-05-01 16:05:54 -07:00
|
|
|
name: filebeat
|
2019-05-01 15:21:32 -07:00
|
|
|
state: restarted
|