nix-config/ansible/roles/elastic.beats/tasks/beats.yml

25 lines
570 B
YAML
Raw Normal View History

2019-08-13 16:19:51 +02:00
---
# Install OS specific beats
- name: Include specific Beats
2021-03-04 18:32:20 +01:00
include_tasks: beats-debian.yml
2019-08-13 16:19:51 +02:00
when: ansible_os_family == 'Debian'
- name: Include specific Beats
2021-03-04 18:32:20 +01:00
include_tasks: beats-redhat.yml
2019-08-13 16:19:51 +02:00
when: ansible_os_family == 'RedHat'
2021-03-04 18:32:20 +01:00
# Configuration file for beats
2019-08-13 16:19:51 +02:00
- name: Beats configuration
2021-03-04 18:32:20 +01:00
include_tasks: beats-config.yml
2019-08-13 16:19:51 +02:00
# Make sure the service is started, and restart if necessary
2021-03-04 18:32:20 +01:00
- name: Start {{ beat_product }} service
become: yes
service:
name: '{{ beat }}'
state: started
enabled: true
2019-08-13 16:19:51 +02:00
when: start_service
register: beats_started