diff --git a/CHANGELOG.md b/CHANGELOG.md index 5278e0dc..7905930c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,22 @@ All notable changes to this project will be documented in this file. ## v3.7.0-37xx +### Added + + - include template local_internal_options.conf ([#87](https://github.com/wazuh/wazuh-ansible/pull/87)) + ### Changed + - Changed windows agent version ([#89](https://github.com/wazuh/wazuh-ansible/pull/89)) + +### Fixed + - Solve the conflict betwwen tha agent configuration and the shared master configuration. Also include monitoring for `/var/log/auth.log` ([#90](https://github.com/wazuh/wazuh-ansible/pull/90)) +### Removed + +- clean old code for windows agent ([#86](https://github.com/wazuh/wazuh-ansible/pull/86)) + ## v3.7.0-3701 ### Added diff --git a/VERSION b/VERSION index 39a07630..0d415e26 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ WAZUH-ANSIBLE_VERSION="v3.7.0" -REVISION="3702" +REVISION="3705" diff --git a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml index 6aecd1ed..1d57aff6 100644 --- a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml +++ b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml @@ -19,10 +19,10 @@ wazuh_notify_time: null wazuh_time_reconnect: null wazuh_winagent_config: install_dir: 'C:\wazuh-agent\' - version: '3.3.1' + version: '3.7.0' revision: '1' repo: https://packages.wazuh.com/3.x/windows/ - md5: 935d1993029021f3951b9511e2171207 + md5: 43936e7bc7eb51bd186f47dac4a6f477 wazuh_agent_config: active_response_disabled: 'no' log_format: 'plain' diff --git a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml index fb0b8ce2..2d17fb16 100644 --- a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml +++ b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml @@ -167,6 +167,17 @@ - init - config +- name: Linux | Installing local_internal_options.conf + template: src=var-ossec-etc-local-internal-options.conf.j2 + dest=/var/ossec/etc/local_internal_options.conf + owner=root + group=ossec + mode=0640 + notify: restart wazuh-agent + tags: + - init + - config + - name: Linux | Ensure Wazuh Agent service is started and enabled service: name: wazuh-agent diff --git a/roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml b/roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml index 7b68f4dd..914ef78b 100644 --- a/roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml +++ b/roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml @@ -75,6 +75,14 @@ tags: - config +- name: Windows | Installing local_internal_options.conf + win_template: + src: var-ossec-etc-local-internal-options.conf.j2 + dest: "{{ wazuh_winagent_config.install_dir }}local_internal_options.conf" + notify: restart wazuh-agent windows + tags: + - config + - name: Windows | Delete downloaded Wazuh agent installer file win_file: path: C:\wazuh-agent-installer.msi diff --git a/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-local-internal-options.conf.j2 b/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-local-internal-options.conf.j2 new file mode 100644 index 00000000..6e3c86a8 --- /dev/null +++ b/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-local-internal-options.conf.j2 @@ -0,0 +1,12 @@ +# local_internal_options.conf +# +# This file should be handled with care. It contains +# run time modifications that can affect the use +# of OSSEC. Only change it if you know what you +# are doing. Look first at ossec.conf +# for most of the things you want to change. +# +# This file will not be overwritten during upgrades. + +# This is the template of Ansible for the file local_internal_options.conf +# In this file you could include the configuration settings for your agents diff --git a/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 b/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 index 982c1579..f0d1c18b 100644 --- a/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 +++ b/roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-ossec-agent.conf.j2 @@ -77,10 +77,6 @@ {% if wazuh_agent_config.syscheck is defined %} no - {% if ansible_os_family == "Windows" %} - C:/wazuh-agent/shared - {% endif %} - {% if ansible_system == "Linux" %} /var/ossec/etc/shared {% endif %} diff --git a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml index 9e619192..ad7f8cfa 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml @@ -156,6 +156,17 @@ - init - config +- name: Installing the local_internal_options.conf + template: src=var-ossec-etc-local-internal-options.conf.j2 + dest=/var/ossec/etc/local_internal_options.conf + owner=root + group=ossec + mode=0640 + notify: restart wazuh-manager + tags: + - init + - config + - name: Retrieving Agentless Credentials include_vars: agentless_creeds.yml tags: diff --git a/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-local-internal-options.conf.j2 b/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-local-internal-options.conf.j2 new file mode 100644 index 00000000..5718f800 --- /dev/null +++ b/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-local-internal-options.conf.j2 @@ -0,0 +1,12 @@ +# local_internal_options.conf +# +# This file should be handled with care. It contains +# run time modifications that can affect the use +# of OSSEC. Only change it if you know what you +# are doing. Look first at ossec.conf +# for most of the things you want to change. +# +# This file will not be overwritten during upgrades. + +# This is the template of Ansible for the file local_internal_options.conf +# In this file you could include the configuration settings for your manager