From 8ef5e65eb7adea66160b5c61f33251cf55fda1fa Mon Sep 17 00:00:00 2001 From: cadoming Date: Wed, 14 Nov 2018 12:13:58 +0000 Subject: [PATCH] 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