Merge pull request #302 from wazuh/feature-300-add-agent-restart

Add notify to Agent registration tasks to explictly restart it
This commit is contained in:
Manuel J. Bernal 2019-11-05 17:08:37 +01:00 committed by GitHub
commit 9ae7b8e2a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
## [v3.xx.x_x.x.x]
### Added
- Wazuh Agent registration task now explicitly notify restart [@jm404](https://github.com/jm404) [#302](https://github.com/wazuh/wazuh-ansible/pull/302)
### Changed
- Make Wazuh repositories installation flexible [@jm404](https://github.com/jm404) [#288](https://github.com/wazuh/wazuh-ansible/pull/288)

View File

@ -63,6 +63,7 @@
{% endif %}
{% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %}-a{% endif %}
register: agent_auth_output
notify: restart wazuh-agent
vars:
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ ansible_hostname }}{% endif %}"
when:
@ -99,6 +100,7 @@
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 %}"