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:
neonmei 2020-11-12 14:34:57 -03:00
parent bab8279f73
commit 0bbdf231f2
No known key found for this signature in database
GPG Key ID: 7EA1832E7E17237E
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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: