Merge branch 'devel' into feature-422-fix-filebeat-module-var

This commit is contained in:
Manuel J. Bernal 2020-06-19 16:28:38 +02:00 committed by GitHub
commit 575ddae995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 11 deletions

View File

@ -1,5 +1,5 @@
---
- name: restart elasticsearch
service:
service:
name: elasticsearch
state: restarted

View File

@ -23,7 +23,7 @@
- name: RedHat/CentOS/Fedora | Install OpenJDK 11
yum:
name: java-11-openjdk-devel
name: java-11-openjdk-devel
state: present
- name: RedHat/CentOS/Fedora | Install OpenDistro dependencies

View File

@ -39,6 +39,7 @@ wazuh_managers:
api_port: 55000
api_proto: 'http'
api_user: null
wazuh_api_reachable_from_agent: false
wazuh_profile_centos: 'centos, centos7, centos7.6'
wazuh_profile_ubuntu: 'ubuntu, ubuntu18, ubuntu18.04'
wazuh_auto_restart: 'yes'

View File

@ -123,15 +123,15 @@
user: "{{ wazuh_managers.0.api_user }}"
password: "{{ api_pass }}"
register: newagent_api
notify: restart wazuh-agent
# changed_when: newagent_api.json.error == 0
vars:
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ inventory_hostname }}{% endif %}"
delegate_to: "{{ 'localhost' if not wazuh_api_reachable_from_agent else inventory_hostname }}"
become: no
changed_when: newagent_api.json.error == 0
when:
- not check_keys.stat.exists or check_keys.stat.size == 0
- wazuh_agent_authd.registration_address is not none
become: false
ignore_errors: true
- wazuh_managers.0.address is not none
tags:
- config
- api
- name: Linux | Retieve new agent data via rest-API
uri:
@ -148,8 +148,11 @@
- wazuh_agent_authd.registration_address is not none
- newagent_api.json.error == 0
register: newagentdata_api
delegate_to: localhost
become: false
delegate_to: "{{ 'localhost' if not wazuh_api_reachable_from_agent else inventory_hostname }}"
become: no
tags:
- config
- api
- name: Linux | Register agent (via rest-API)
command: /var/ossec/bin/manage_agents