diff --git a/provisioning/roles/wazuh/ansible-filebeat-oss/tasks/main.yml b/provisioning/roles/wazuh/ansible-filebeat-oss/tasks/main.yml index 843bbfd42d..e8203dc494 100644 --- a/provisioning/roles/wazuh/ansible-filebeat-oss/tasks/main.yml +++ b/provisioning/roles/wazuh/ansible-filebeat-oss/tasks/main.yml @@ -30,23 +30,11 @@ path: "{{ filebeat_module_folder }}" register: filebeat_module_folder -- name: Download pre-release Filebeat module package - get_url: - url: "{{ filebeat_module_pre_release_package_url }}/{{ filebeat_module_package_name }}" - dest: "{{ filebeat_module_package_path }}" - when: not filebeat_module_folder.stat.exists and repository == "pre-release" - -- name: Download staging Filebeat module package - get_url: - url: "{{ filebeat_module_staging_package_url }}/{{ filebeat_module_package_name }}" - dest: "{{ filebeat_module_package_path }}" - when: not filebeat_module_folder.stat.exists and repository == "staging" - -- name: Download production Filebeat module package +- name: Download Filebeat module package get_url: url: "{{ filebeat_module_package_url }}/{{ filebeat_module_package_name }}" dest: "{{ filebeat_module_package_path }}" - when: not filebeat_module_folder.stat.exists and repository == "live" + when: not filebeat_module_folder.stat.exists - name: Unpack Filebeat module package unarchive: diff --git a/provisioning/roles/wazuh/wazuh_environment/schema.j2 b/provisioning/roles/wazuh/wazuh_environment/schema.j2 index 94ac28d10a..bc8a72b07e 100644 --- a/provisioning/roles/wazuh/wazuh_environment/schema.j2 +++ b/provisioning/roles/wazuh/wazuh_environment/schema.j2 @@ -106,11 +106,21 @@ wazuh_custom_packages_installation_indexer_rpm_url: {{ role_parameters['wazuh_cu {% endif %} {% if role == 'filebeat' %} -{% if role_parameters['filebeat_repo'] is defined%} +{% if role_parameters['filebeat_repo'] is defined %} filebeat_module_package_url: {{ role_parameters['filebeat_repo'] }} +{% else %} +{% if repository == 'pre-release' %} +filebeat_module_package_url: https://packages-dev.wazuh.com/pre-release/filebeat +{% elif repository == 'live' %} +filebeat_module_package_url: https://packages.wazuh.com/4.x/filebeat +{% elif repository == 'staging' %} +filebeat_module_package_url: https://packages-dev.wazuh.com/staging/filebeat +{% endif %} {% endif %} {% endif %} + + {%- endmacro -%} {% if indexer is defined%}