wazuh-ansible-4.8.1/roles/wazuh
Christos Pollalis f6e020631e Make agent registration via the rest API idempotent
Check whether an error was returned by the HTTP POST to the `agents/`
endpoint before invoking `/var/ossec/bin/manage_agents` in order to
register a new agent.

It seems like that if an agent has already been registered under the
given name, the HTTP POST will return an error that'll cause the next
task, which is meant to retrieve the agent information, to be skipped.
That'll cause the agent registration task to fail in return. Instead,
this change will cause the aforementioned task to be skipped, too. So,
if an agent has already been successfully registered and the playbook
is re-run, it'll run all the way to the end.

If anything goes wrong (during the registration process) and the agent
fails to start, the `restart wazuh-agent` handler will still fail.
2020-04-11 02:15:42 +03:00
..
ansible-filebeat Removing readall perms in certs files. Minor syntax normalizations 2020-03-17 18:21:33 +01:00
ansible-wazuh-agent Make agent registration via the rest API idempotent 2020-04-11 02:15:42 +03:00
ansible-wazuh-manager Minor jinja template fixes 2020-03-25 16:23:46 +01:00