diff --git a/ansible-wazuh-agent/defaults/main.yml b/ansible-wazuh-agent/defaults/main.yml
index 2b01c5e7..32b7c719 100644
--- a/ansible-wazuh-agent/defaults/main.yml
+++ b/ansible-wazuh-agent/defaults/main.yml
@@ -1,5 +1,6 @@
---
wazuh_manager_ip: 127.0.0.1
+wazuh_manager_proto: udp
wazuh_authd_port: 1515
wazuh_register_client: false
wazuh_agent_config:
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 1361a41e..5396c904 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
@@ -11,7 +11,14 @@
{% if wazuh_profile is defined %}
{{ wazuh_profile }}
{% endif %}
- udp
+ {{ 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 %}
+ {{ wazuh_notify_time }}
+ {{ wazuh_time_reconnect }}
+ {% endif %}