Merge branch '3.7' into Issue_78-windows_ossec_conf

This commit is contained in:
Carlos Dominguez 2019-01-10 13:11:03 +01:00 committed by GitHub
commit 02736e1ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
### Added ### Added
- Adapt ossec.conf file for windows agents ([#118](https://github.com/wazuh/wazuh-ansible/pull/118)) - Added custom name for single agent registration ([#117](https://github.com/wazuh/wazuh-ansible/pull/117))
### Changed ### Changed

View File

@ -1,2 +1,2 @@
WAZUH-ANSIBLE_VERSION="v3.7.2" WAZUH-ANSIBLE_VERSION="v3.7.2"
REVISION="3714" REVISION="3715"

View File

@ -45,6 +45,7 @@
- name: Linux | Register agent (via authd) - name: Linux | Register agent (via authd)
shell: > shell: >
/var/ossec/bin/agent-auth /var/ossec/bin/agent-auth
-A {{ agent_name }}
-m {{ wazuh_managers.0.address }} -m {{ wazuh_managers.0.address }}
-p {{ wazuh_agent_authd.port }} -p {{ wazuh_agent_authd.port }}
{% if authd_pass is defined %}-P {{ authd_pass }}{% endif %} {% if authd_pass is defined %}-P {{ authd_pass }}{% endif %}
@ -55,6 +56,8 @@
{% endif %} {% endif %}
{% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %}-a{% endif %} {% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %}-a{% endif %}
register: agent_auth_output register: agent_auth_output
vars:
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ ansible_hostname }}{% endif %}"
when: when:
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none
@ -87,7 +90,7 @@
url: "{{ wazuh_managers.0.api_proto }}://{{ wazuh_managers.0.address }}:{{ wazuh_managers.0.api_port }}/agents/" url: "{{ wazuh_managers.0.api_proto }}://{{ wazuh_managers.0.address }}:{{ wazuh_managers.0.api_port }}/agents/"
validate_certs: no validate_certs: no
method: POST method: POST
body: {"name":"{{ inventory_hostname }}"} body: {"name":"{{ agent_name }}"}
body_format: json body_format: json
status_code: 200 status_code: 200
headers: headers:
@ -96,6 +99,8 @@
password: "{{ api_pass }}" password: "{{ api_pass }}"
register: newagent_api register: newagent_api
changed_when: newagent_api.json.error == 0 changed_when: newagent_api.json.error == 0
vars:
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ inventory_hostname }}{% endif %}"
when: when:
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none