From 0f388781ba659db80694d0005c1ebe8e0602fac9 Mon Sep 17 00:00:00 2001 From: Miguelangel Freitas Date: Sun, 20 Aug 2017 21:21:29 -0400 Subject: [PATCH] Add variables for visibility (wazuh-agent role). --- ansible-wazuh-agent/defaults/main.yml | 4 +++- .../templates/var-ossec-etc-ossec-agent.conf.j2 | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ansible-wazuh-agent/defaults/main.yml b/ansible-wazuh-agent/defaults/main.yml index 22682137..860367e8 100644 --- a/ansible-wazuh-agent/defaults/main.yml +++ b/ansible-wazuh-agent/defaults/main.yml @@ -1,8 +1,10 @@ --- wazuh_manager_ip: 127.0.0.1 +wazuh_profile: null wazuh_manager_proto: udp -wazuh_authd_port: 1515 wazuh_register_client: false +wazuh_notify_time: null +wazuh_time_reconnect: null wazuh_agent_config: syscheck: frequency: 43200 diff --git a/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 b/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 index 35c83fbb..984ca817 100644 --- a/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 +++ b/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 @@ -8,14 +8,14 @@ {{ wazuh_manager_ip }} - {% if wazuh_profile is defined %} + {% if wazuh_profile is not none %} {{ wazuh_profile }} {% endif %} {{ wazuh_manager_proto }} {% if wazuh_manager_port is defined %} {{ wazuh_manager_port }} {% endif %} - {% if wazuh_notify_time is defined and wazuh_time_reconnect is defined %} + {% if wazuh_notify_time is not none and wazuh_time_reconnect is not none %} {{ wazuh_notify_time }} {{ wazuh_time_reconnect }} {% endif %}