ansible-roles/filebeat/tasks/main.yml

29 lines
685 B
YAML
Raw Normal View History

2016-11-17 16:17:35 +01:00
---
- name: Filebeat is installed
apt:
name: filebeat
update_cache: yes
state: installed
tags:
- packages
- name: Filebeat service is enabled
service:
name: filebeat
enabled: yes
- name: Kibana dashboards are imported
command: /usr/share/filebeat/scripts/import_dashboards
failed_when: '"fail" in stdout'
when: filebeat_kibana_dashboards
- name: is logstash-plugin available?
stat:
path: /usr/share/logstash/bin/logstash-plugin
register: logstash_plugin
- name: Logstash plugin is installed
command: /usr/share/logstash/bin/logstash-plugin install logstash-input-beats
when: filebeat_logstash_plugin and logstash_plugin.stat.exists