From 5c1f2ed783fba996b63f990dd5fa5a5c034edb91 Mon Sep 17 00:00:00 2001 From: cadoming Date: Wed, 14 Nov 2018 10:39:25 +0000 Subject: [PATCH 01/13] clean old code for windows agent --- .../templates/var-ossec-etc-ossec-agent.conf.j2 | 4 ---- 1 file changed, 4 deletions(-) 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 %} From 8ef5e65eb7adea66160b5c61f33251cf55fda1fa Mon Sep 17 00:00:00 2001 From: cadoming Date: Wed, 14 Nov 2018 12:13:58 +0000 Subject: [PATCH 02/13] include template local_internal_options.conf --- roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml | 11 +++++++++++ .../var-ossec-etc-local-internal-options.conf.j2 | 12 ++++++++++++ roles/wazuh/ansible-wazuh-manager/tasks/main.yml | 11 +++++++++++ .../var-ossec-etc-local-internal-options.conf.j2 | 12 ++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 roles/wazuh/ansible-wazuh-agent/templates/var-ossec-etc-local-internal-options.conf.j2 create mode 100644 roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-local-internal-options.conf.j2 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/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-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 From 6fe87697f198480bea9c63f0cef3dd9495cf5cff Mon Sep 17 00:00:00 2001 From: cadoming Date: Thu, 15 Nov 2018 10:40:57 +0000 Subject: [PATCH 03/13] Changed windows agent version --- roles/wazuh/ansible-wazuh-agent/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml index db29e6ab..787d1d91 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' From b19b9dcfae13da2f5dd5b08021b44f9fcaec972c Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 11:00:26 +0100 Subject: [PATCH 04/13] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949b31ae..56fca392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file. ## v3.7.0-37xx +### Removed +- clean old code for windows agent ([#86](https://github.com/wazuh/wazuh-ansible/pull/86)) ## v3.7.0-3701 From c396bf0c647313e80c82cbdfab15c1ec41bcdf1a Mon Sep 17 00:00:00 2001 From: Carlos Dominguez <43823505+cadoming@users.noreply.github.com> Date: Fri, 16 Nov 2018 11:05:15 +0100 Subject: [PATCH 05/13] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949b31ae..cc88ecdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ 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)) ## v3.7.0-3701 From 0c8afb81aaffbc17f46aa22e7e51a6c2bdf64288 Mon Sep 17 00:00:00 2001 From: Carlos Dominguez <43823505+cadoming@users.noreply.github.com> Date: Fri, 16 Nov 2018 11:07:15 +0100 Subject: [PATCH 06/13] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949b31ae..ec1f770c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file. ## v3.7.0-37xx +### Changed +- Changed windows agent version ([#89](https://github.com/wazuh/wazuh-ansible/pull/89)) ## v3.7.0-3701 From b89093a1a82668b9c53773034f289f28da63c7d4 Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 11:07:30 +0100 Subject: [PATCH 07/13] Bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 39a07630..39708582 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ WAZUH-ANSIBLE_VERSION="v3.7.0" -REVISION="3702" +REVISION="3703" From bdf913453e4b57680d6064c11af34cbc9367ccb1 Mon Sep 17 00:00:00 2001 From: cadoming Date: Fri, 16 Nov 2018 10:34:41 +0000 Subject: [PATCH 08/13] Added windows task --- roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml | 8 ++++++++ 1 file changed, 8 insertions(+) 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 From 0b15204812cb3fb01a8aff73b0985b10743aa2cf Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 11:40:24 +0100 Subject: [PATCH 09/13] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index baf4c070..4bf18df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. ## v3.7.0-37xx +### Changed + + - Changed windows agent version ([#89](https://github.com/wazuh/wazuh-ansible/pull/89)) ### Removed From 96054c4899408f5e466d72c2248e8ad792f733b2 Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 11:42:57 +0100 Subject: [PATCH 10/13] Bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 39708582..652953c2 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ WAZUH-ANSIBLE_VERSION="v3.7.0" -REVISION="3703" +REVISION="3704" From ccca02bea15744c9832229fdb85de1b60c7fe277 Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 12:23:36 +0100 Subject: [PATCH 11/13] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38996a80..7ef4a943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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)) From 5609c23607167eb3c659b68866d02c4b5fb8513b Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 12:24:15 +0100 Subject: [PATCH 12/13] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef4a943..dd21aaec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,6 @@ All notable changes to this project will be documented in this file. - clean old code for windows agent ([#86](https://github.com/wazuh/wazuh-ansible/pull/86)) -- include template local_internal_options.conf ([#87](https://github.com/wazuh/wazuh-ansible/pull/87)) ## v3.7.0-3701 From 95b19c14ab68a1b9571424b2f434de32e02dc6e7 Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Fri, 16 Nov 2018 12:24:48 +0100 Subject: [PATCH 13/13] Bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 652953c2..0d415e26 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ WAZUH-ANSIBLE_VERSION="v3.7.0" -REVISION="3704" +REVISION="3705"