Skip to content

Commit

Permalink
Merge branch 'enhancement/4931-change-filebeat-template-url' of githu…
Browse files Browse the repository at this point in the history
…b.com:wazuh/wazuh-qa into enhancement/4931-change-filebeat-template-url
  • Loading branch information
MARCOSD4 committed Feb 15, 2024
2 parents 54f6b83 + 242b1e7 commit 5ecfded
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ filebeat_output_indexer_hosts:
- "localhost:9200"

filebeat_module_package_url: https://packages.wazuh.com/4.x/filebeat
filebeat_module_pre_release_package_url: https://packages-dev.wazuh.com/pre-release/filebeat
filebeat_module_staging_package_url: https://packages-dev.wazuh.com/staging/filebeat
filebeat_module_package_name: wazuh-filebeat-0.4.tar.gz
filebeat_module_package_path: /tmp/
filebeat_module_destination: /usr/share/filebeat/module
Expand All @@ -28,4 +26,4 @@ filebeatrepo:
apt: 'deb https://packages.wazuh.com/4.x/apt/ stable main'
yum: 'https://packages.wazuh.com/4.x/yum/'
gpg: 'https://packages.wazuh.com/key/GPG-KEY-WAZUH'
key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'
key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'
16 changes: 2 additions & 14 deletions provisioning/roles/wazuh/ansible-filebeat-oss/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 9 additions & 1 deletion provisioning/roles/wazuh/wazuh_environment/schema.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,16 @@ 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 role_parameters['repository'] == 'pre-release' %}
filebeat_module_package_url: https://packages-dev.wazuh.com/pre-release/filebeat
{% elif role_parameters['repository'] == 'live' %}
filebeat_module_package_url: https://packages.wazuh.com/4.x/filebeat
{% elif role_parameters['repository'] == 'staging' %}
filebeat_module_package_url: https://packages-dev.wazuh.com/staging/filebeat
{% endif %}
{% endif %}
{% endif %}

Expand Down

0 comments on commit 5ecfded

Please sign in to comment.