Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.keys registration triggers #79

Merged
merged 1 commit into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %}-a{% endif %}
register: agent_auth_output
when:
- check_keys.stat.size == 0
- check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none
tags:
- config
Expand All @@ -65,7 +65,7 @@
- name: Linux | Verify agent registration
shell: echo {{ agent_auth_output }} | grep "Valid key created"
when:
- check_keys.stat.size == 0
- check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none
tags:
- config
Expand Down Expand Up @@ -97,7 +97,7 @@
register: newagent_api
changed_when: newagent_api.json.error == 0
when:
- check_keys.stat.size == 0
- check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none
become: no
tags:
Expand All @@ -113,7 +113,7 @@
user: "{{ wazuh_managers.0.api_user }}"
password: "{{ api_pass }}"
when:
- check_keys.stat.size == 0
- check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none
- newagent_api.json.error == 0
register: newagentdata_api
Expand All @@ -134,7 +134,7 @@
OSSEC_ACTION_CONFIRMED: y
register: manage_agents_output
when:
- check_keys.stat.size == 0
- check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none
- newagent_api.changed
tags:
Expand Down
2 changes: 1 addition & 1 deletion roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
notify: restart wazuh-agent windows
when:
- wazuh_agent_authd.enable == true
- check_windows_key.stat.exists == false
- check_windows_key.stat.exists == false or check_windows_key.stat.size == 0
- wazuh_managers.0.address is not none
tags:
- config
Expand Down