Wazuh manager: switch between log output types.
This commit is contained in:
parent
d5eb54a01b
commit
263ceebded
@ -2,6 +2,9 @@
|
|||||||
wazuh_manager_fqdn: "wazuh-server"
|
wazuh_manager_fqdn: "wazuh-server"
|
||||||
|
|
||||||
wazuh_manager_config:
|
wazuh_manager_config:
|
||||||
|
json_output: 'yes'
|
||||||
|
alerts_log: 'yes'
|
||||||
|
logall: 'no'
|
||||||
enable_authd: false
|
enable_authd: false
|
||||||
email_notification: no
|
email_notification: no
|
||||||
mail_to:
|
mail_to:
|
||||||
|
|||||||
@ -89,6 +89,15 @@
|
|||||||
- name: Retrieving Wazuh-api User Credentials
|
- name: Retrieving Wazuh-api User Credentials
|
||||||
include_vars: wazuh_api_creds.yml
|
include_vars: wazuh_api_creds.yml
|
||||||
|
|
||||||
|
- name: Checking alert log output settings
|
||||||
|
fail: msg="Please enable json_output or alerts_log options."
|
||||||
|
when:
|
||||||
|
- wazuh_manager_config.json_output == 'no'
|
||||||
|
- wazuh_manager_config.alerts_log == 'no'
|
||||||
|
tags:
|
||||||
|
- init
|
||||||
|
- config
|
||||||
|
|
||||||
- name: Configure ossec.conf
|
- name: Configure ossec.conf
|
||||||
template: src=var-ossec-etc-ossec-server.conf.j2
|
template: src=var-ossec-etc-ossec-server.conf.j2
|
||||||
dest=/var/ossec/etc/ossec.conf
|
dest=/var/ossec/etc/ossec.conf
|
||||||
|
|||||||
@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
<ossec_config>
|
<ossec_config>
|
||||||
<global>
|
<global>
|
||||||
<jsonout_output>yes</jsonout_output>
|
<jsonout_output>{{ wazuh_manager_config.json_output }}</jsonout_output>
|
||||||
<alerts_log>yes</alerts_log>
|
<alerts_log>{{ wazuh_manager_config.alerts_log }}</alerts_log>
|
||||||
|
<logall>{{ wazuh_manager_config.logall }}</logall>
|
||||||
{% if wazuh_manager_config.email_notification | lower == "yes" %}
|
{% if wazuh_manager_config.email_notification | lower == "yes" %}
|
||||||
<email_notification>yes</email_notification>
|
<email_notification>yes</email_notification>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user