Skip to content

Commit 11c3956

Browse files
committed
Add agent-upgrade module to wazuh-agent role
1 parent 4f1c79e commit 11c3956

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

roles/wazuh/ansible-wazuh-agent/defaults/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,25 @@ wazuh_agent_active_response:
352352
ca_store_macos: 'etc/wpk_root.pem'
353353
ca_verification: 'yes'
354354

355+
## Agent Upgrade
356+
wazuh_agent_agent_upgrade:
357+
enabled: 'yes'
358+
notification_wait_start: '60s'
359+
notification_wait_factor: '4'
360+
notification_wait_max: '2h'
361+
ca_verification: 'yes'
362+
ca_store: "{{ wazuh_dir }}/etc/wpk_root.pem"
363+
ca_store_win: 'wpk_root.pem'
364+
ca_store_macos: 'etc/wpk_root.pem'
365+
355366
## Logging
356367
wazuh_agent_log_format: 'plain'
357368

358369
# wazuh_agent_config
359370
wazuh_agent_config_defaults:
360371
repo: '{{ wazuh_repo }}'
361372
active_response: '{{ wazuh_agent_active_response }}'
373+
agent_upgrade: '{{ wazuh_agent_agent_upgrade }}'
362374
log_format: '{{ wazuh_agent_log_format }}'
363375
client_buffer: '{{ wazuh_agent_client_buffer }}'
364376
syscheck: '{{ wazuh_agent_syscheck }}'

roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,9 @@
472472
<active-response>
473473
<disabled>{{ wazuh_agent_config.active_response.ar_disabled|default('no') }}</disabled>
474474
<ca_verification>{{ wazuh_agent_config.active_response.ca_verification }}</ca_verification>
475-
{% if ansible_system == "Windows" %}
475+
{% if ansible_os_family == "Windows" %}
476476
<ca_store>{{ wazuh_agent_config.active_response.ca_store_win }}</ca_store>
477-
{% elif ansible_system == "Darwin" %}
477+
{% elif ansible_os_family == "Darwin" %}
478478
<ca_store>{{ wazuh_agent_config.active_response.ca_store_macos }}</ca_store>
479479
{% else %}
480480
<ca_store>{{ wazuh_agent_config.active_response.ca_store }}</ca_store>
@@ -485,4 +485,21 @@
485485
<log_format>{{ wazuh_agent_config.log_format }}</log_format>
486486
</logging>
487487

488+
<agent-upgrade>
489+
<enabled>{{ wazuh_agent_config.agent_upgrade.enabled }}</enabled>
490+
<notification_wait_start>{{ wazuh_agent_config.agent_upgrade.notification_wait_start }}</notification_wait_start>
491+
<notification_wait_factor>{{ wazuh_agent_config.agent_upgrade.notification_wait_factor }}</notification_wait_factor>
492+
<notification_wait_max>{{ wazuh_agent_config.agent_upgrade.notification_wait_max }}</notification_wait_max>
493+
<ca_verification>
494+
<enabled>{{ wazuh_agent_config.agent_upgrade.ca_verification }}</enabled>
495+
{% if ansible_os_family == "Windows" %}
496+
<ca_store>{{ wazuh_agent_config.agent_upgrade.ca_store_win }}</ca_store>
497+
{% elif ansible_os_family == "Darwin" %}
498+
<ca_store>{{ wazuh_agent_config.agent_upgrade.ca_store_macos }}</ca_store>
499+
{% else %}
500+
<ca_store>{{ wazuh_agent_config.agent_upgrade.ca_store }}</ca_store>
501+
{% endif %}
502+
</ca_verification>
503+
</agent-upgrade>
504+
488505
</ossec_config>

0 commit comments

Comments
 (0)