diff --git a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml index fcda6d31..54b370f8 100644 --- a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml +++ b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml @@ -226,6 +226,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) tags: - config diff --git a/roles/wazuh/ansible-wazuh-agent/vars/authd_pass.yml b/roles/wazuh/ansible-wazuh-agent/vars/authd_pass.yml index 36e0cdeb..c1f4da4f 100644 --- a/roles/wazuh/ansible-wazuh-agent/vars/authd_pass.yml +++ b/roles/wazuh/ansible-wazuh-agent/vars/authd_pass.yml @@ -1,4 +1,4 @@ --- # We recommend the use of Ansible Vault to protect Wazuh, api, agentless and authd credentials. # authd_pass: 'foobar' -authd_pass: ultrasecret \ No newline at end of file +authd_pass: '' \ No newline at end of file