wazuh-ansible-4.8.1/roles/wazuh/ansible-wazuh-agent
Peter Dragos df46716a9b
add localfile labels to agent ossec.conf template
This change enables generating a stanza such as

```
<localfile>
  <location>/var/log/myapp/log.json</location>
  <log_format>json</log_format>
  <label key="@source">myapp</label>
  <label key="agent.type">webserver</label>
</localfile>
```

from the `wazuh_agent_config` snippet:

```
                - format: json
                  location: /var/log/myapp/log.json
                  label:
                    - key: "@source"
                      value: "myapp"    
                    - key: "agent.type"
                      value: "webserver"
```
2020-12-14 18:05:36 -05:00
..
defaults release: update wazuh-agent windows installer md5 2020-11-30 14:00:58 -03:00
handlers Update wazuh-agent windows handler for restarting 2019-09-09 13:08:38 +02:00
meta changing permissions 2019-07-17 12:21:19 +02:00
tasks roles/wazuh-agent: change all delegate_to REST conditionals to be uniform 2020-11-26 16:35:41 -03:00
templates add localfile labels to agent ossec.conf template 2020-12-14 18:05:36 -05:00
README.md Update year 2020-10-02 13:13:00 +02:00

Ansible Playbook - Wazuh agent

This role will install and configure a Wazuh Agent.

OS Requirements

This role is compatible with:

  • Red Hat
  • CentOS
  • Fedora
  • Debian
  • Ubuntu

Role Variables

  • wazuh_managers: Collection of Wazuh Managers' IP address, port, and protocol used by the agent
  • wazuh_agent_authd: Collection with the settings to register an agent using authd.

Playbook example

The following is an example of how this role can be used:

 - hosts: all:!wazuh-manager
   roles:
     - ansible-wazuh-agent
   vars:
     wazuh_managers:
       - address: 127.0.0.1
         port: 1514
         protocol: tcp
         api_port: 55000
         api_proto: 'http'
         api_user: 'ansible'
     wazuh_agent_authd:
       registration_address: 127.0.0.1
       enable: true
       port: 1515
       ssl_agent_ca: null
       ssl_auto_negotiate: 'no'

WAZUH Copyright (C) 2020 Wazuh Inc. (License GPLv3)

Based on previous work from dj-wasabi

Modified by Wazuh

The playbooks have been modified by Wazuh, including some specific requirements, templates and configuration to improve integration with Wazuh ecosystem.