37 lines
808 B
YAML
37 lines
808 B
YAML
---
|
|
- include: RedHat.yml
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- include: Debian.yml
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Logstash configuration
|
|
template:
|
|
src: 01-wazuh.conf.j2
|
|
dest: /etc/logstash/conf.d/01-wazuh.conf
|
|
owner: root
|
|
group: root
|
|
notify: restart logstash
|
|
|
|
- name: Logstash template
|
|
template:
|
|
src: wazuh-elastic5-template.json.j2
|
|
dest: /etc/logstash/wazuh-elastic5-template.json
|
|
owner: root
|
|
group: root
|
|
notify: restart logstash
|
|
|
|
- name: Ensure Logstash started and enabled
|
|
service:
|
|
name: logstash
|
|
enabled: yes
|
|
state: started
|
|
|
|
- name: Remove the correct repository
|
|
include: "RMRedHat.yml"
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
- name: Remove the correct repository
|
|
include: "RMDebian.yml"
|
|
when: ansible_os_family == "Debian"
|