roles/wazuh-agent: remove "is defined" conditionals, as authd_pass is now part of roles default, now check is only against length
This commit is contained in:
parent
bab8279f73
commit
0bbdf231f2
@ -78,7 +78,7 @@
|
||||
-m {{ wazuh_agent_authd.registration_address }}
|
||||
-p {{ wazuh_agent_authd.port }}
|
||||
{% if wazuh_agent_nat %} -I "any" {% endif %}
|
||||
{% if authd_pass is defined %} -P {{ authd_pass }} {% endif %}
|
||||
{% if authd_pass | length > 0 %} -P {{ authd_pass }} {% endif %}
|
||||
{% if wazuh_agent_authd.ssl_agent_ca is defined and wazuh_agent_authd.ssl_agent_ca != None %}
|
||||
-v "/var/ossec/etc/{{ wazuh_agent_authd.ssl_agent_ca | basename }}"
|
||||
{% endif %}
|
||||
@ -215,7 +215,7 @@
|
||||
when:
|
||||
- wazuh_agent_config.enrollment.enabled == 'yes'
|
||||
- wazuh_agent_config.enrollment.authorization_pass_path | length > 0
|
||||
- ( authd_pass is defined) and ( authd_pass|length > 0)
|
||||
- authd_pass | length > 0
|
||||
tags:
|
||||
- config
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
-m {{ wazuh_agent_authd.registration_address }}
|
||||
-p {{ wazuh_agent_authd.port }}
|
||||
{% if wazuh_agent_authd.agent_name is not none %}-A {{ wazuh_agent_authd.agent_name }} {% endif %}
|
||||
{% if authd_pass is defined %} -P {{ authd_pass }}{% endif %}
|
||||
{% if authd_pass | length > 0 %} -P {{ authd_pass }}{% endif %}
|
||||
register: agent_auth_output
|
||||
notify: Windows | Restart Wazuh Agent
|
||||
when:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user