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:
commit
9ae7b8e2a8
@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [v3.xx.x_x.x.x]
|
## [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
|
### Changed
|
||||||
|
|
||||||
- Make Wazuh repositories installation flexible [@jm404](https://github.com/jm404) [#288](https://github.com/wazuh/wazuh-ansible/pull/288)
|
- Make Wazuh repositories installation flexible [@jm404](https://github.com/jm404) [#288](https://github.com/wazuh/wazuh-ansible/pull/288)
|
||||||
|
|||||||
@ -63,6 +63,7 @@
|
|||||||
{% 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
|
||||||
|
notify: restart wazuh-agent
|
||||||
vars:
|
vars:
|
||||||
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ ansible_hostname }}{% endif %}"
|
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ ansible_hostname }}{% endif %}"
|
||||||
when:
|
when:
|
||||||
@ -99,6 +100,7 @@
|
|||||||
user: "{{ wazuh_managers.0.api_user }}"
|
user: "{{ wazuh_managers.0.api_user }}"
|
||||||
password: "{{ api_pass }}"
|
password: "{{ api_pass }}"
|
||||||
register: newagent_api
|
register: newagent_api
|
||||||
|
notify: restart wazuh-agent
|
||||||
# changed_when: newagent_api.json.error == 0
|
# changed_when: newagent_api.json.error == 0
|
||||||
vars:
|
vars:
|
||||||
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ inventory_hostname }}{% endif %}"
|
agent_name: "{% if single_agent_name is defined %}{{ single_agent_name }}{% else %}{{ inventory_hostname }}{% endif %}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user