client.keys registration triggers

This commit is contained in:
root 2018-11-06 10:48:02 +00:00
parent 1bd21e381b
commit 5298084a62
2 changed files with 6 additions and 6 deletions

View File

@ -56,7 +56,7 @@
{% 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
when: when:
- 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
tags: tags:
- config - config
@ -65,7 +65,7 @@
- name: Linux | Verify agent registration - name: Linux | Verify agent registration
shell: echo {{ agent_auth_output }} | grep "Valid key created" shell: echo {{ agent_auth_output }} | grep "Valid key created"
when: when:
- 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
tags: tags:
- config - config
@ -97,7 +97,7 @@
register: newagent_api register: newagent_api
changed_when: newagent_api.json.error == 0 changed_when: newagent_api.json.error == 0
when: when:
- 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
become: no become: no
tags: tags:
@ -113,7 +113,7 @@
user: "{{ wazuh_managers.0.api_user }}" user: "{{ wazuh_managers.0.api_user }}"
password: "{{ api_pass }}" password: "{{ api_pass }}"
when: when:
- 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
- newagent_api.json.error == 0 - newagent_api.json.error == 0
register: newagentdata_api register: newagentdata_api
@ -134,7 +134,7 @@
OSSEC_ACTION_CONFIRMED: y OSSEC_ACTION_CONFIRMED: y
register: manage_agents_output register: manage_agents_output
when: when:
- 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
- newagent_api.changed - newagent_api.changed
tags: tags:

View File

@ -62,7 +62,7 @@
notify: restart wazuh-agent windows notify: restart wazuh-agent windows
when: when:
- wazuh_agent_authd.enable == true - 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 - wazuh_managers.0.address is not none
tags: tags:
- config - config