25 lines
570 B
YAML
25 lines
570 B
YAML
---
|
|
# Install OS specific beats
|
|
|
|
- name: Include specific Beats
|
|
include_tasks: beats-debian.yml
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: Include specific Beats
|
|
include_tasks: beats-redhat.yml
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
# Configuration file for beats
|
|
- name: Beats configuration
|
|
include_tasks: beats-config.yml
|
|
|
|
# Make sure the service is started, and restart if necessary
|
|
- name: Start {{ beat_product }} service
|
|
become: yes
|
|
service:
|
|
name: '{{ beat }}'
|
|
state: started
|
|
enabled: true
|
|
when: start_service
|
|
register: beats_started
|