Ansible/roles/luther38.filebeat/tasks/ubuntu.yml

31 lines
530 B
YAML
Raw Normal View History

- 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
- name: Update config
become: true
template:
2019-05-01 16:05:54 -07:00
src: filebeat.j2
dest: /etc/filebeat/filebeat.yml
backup: yes
- name: systemd enable elasticsearch
become: true
when: systemd_enabled == true
systemd:
2019-05-01 16:05:54 -07:00
name: filebeat
enabled: true
- name: systemd restart elasticsearch
become: true
when: systemd_restart == true
systemd:
2019-05-01 16:05:54 -07:00
name: filebeat
state: restarted