Modify registration task to use new fact "wazuh_agent_win_auth_path"
This commit is contained in:
parent
ea69b7fc9b
commit
a52d5e540c
@ -58,15 +58,12 @@
|
|||||||
|
|
||||||
- name: Windows | Register agent
|
- name: Windows | Register agent
|
||||||
win_shell: >
|
win_shell: >
|
||||||
{% if check_path.stat.exists %}{{ wazuh_winagent_config.auth_path_x86 }}{% else %}
|
{{ wazuh_agent_win_auth_path }}
|
||||||
{{ wazuh_winagent_config.auth_path }}{% endif %}
|
|
||||||
-m {{ wazuh_managers.0.address }}
|
-m {{ wazuh_managers.0.address }}
|
||||||
-p {{ wazuh_agent_authd.port }}
|
-p {{ wazuh_agent_authd.port }}
|
||||||
{% if authd_pass is defined %} -P {{ authd_pass }}{% endif %}
|
{% if authd_pass is defined %} -P {{ authd_pass }}{% endif %}
|
||||||
args:
|
|
||||||
chdir: "{{ wazuh_agent_win_path }}"
|
|
||||||
register: agent_auth_output
|
register: agent_auth_output
|
||||||
notify: restart wazuh-agent windows
|
notify: Windows | Restart Wazuh Agent
|
||||||
when:
|
when:
|
||||||
- wazuh_agent_authd.enable
|
- wazuh_agent_authd.enable
|
||||||
- not check_windows_key.stat.exists or check_windows_key.stat.size == 0
|
- not check_windows_key.stat.exists or check_windows_key.stat.size == 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user