From 6525691769388553a330469898312d26e4c3fb1b Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Mon, 14 Apr 2025 08:25:59 -0500 Subject: [PATCH 1/5] Modify Filebeat installation task for arm64 (aarch64) architecture to add revision '-1' --- CHANGELOG.md | 2 +- roles/wazuh/ansible-filebeat-oss/tasks/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7862dc47..3e990e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- None +- Update the Filebeat installation for arm64 to include revision ([#x](https://github.com/wazuh/wazuh-ansible/pull/x)) ### Deleted diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/main.yml b/roles/wazuh/ansible-filebeat-oss/tasks/main.yml index d4255a68..3d2eff48 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/main.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/main.yml @@ -15,7 +15,7 @@ - name: Install Filebeat | Redhat yum: - name: "filebeat-{{ filebeat_version }}" + name: "filebeat-{{ filebeat_version }}-1" state: present lock_timeout: 200 register: install @@ -26,7 +26,7 @@ - name: Install Filebeat | Debian apt: - name: "filebeat={{ filebeat_version }}" + name: "filebeat={{ filebeat_version }}-1" state: present register: install tags: From da6d2c34a0ec82783f8fd11b146aa679a38ee2ad Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Mon, 14 Apr 2025 10:06:12 -0500 Subject: [PATCH 2/5] Use 'wazuh_repo' variable instead of 'filebeatrepo' --- CHANGELOG.md | 2 +- roles/wazuh/ansible-filebeat-oss/defaults/main.yml | 7 ------- roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml | 12 ++++++------ roles/wazuh/ansible-filebeat-oss/tasks/RMDebian.yml | 2 +- roles/wazuh/ansible-filebeat-oss/tasks/RedHat.yml | 4 ++-- roles/wazuh/ansible-filebeat-oss/tasks/main.yml | 7 +++++-- 6 files changed, 15 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e990e33..bbe06a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- Update the Filebeat installation for arm64 to include revision ([#x](https://github.com/wazuh/wazuh-ansible/pull/x)) +- Update the Filebeat installation for arm64 to include revision ([#1616](https://github.com/wazuh/wazuh-ansible/pull/1616)) ### Deleted diff --git a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml index 499ab5d0..b9d8ac8c 100644 --- a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml +++ b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml @@ -20,10 +20,3 @@ filebeat_ssl_dir: /etc/pki/filebeat # Local path to store the generated certificates (Opensearch security plugin) local_certs_path: "{{ playbook_dir }}/indexer/certificates" - -filebeatrepo: - keyring_path: '/usr/share/keyrings/wazuh.gpg' - apt: "deb [signed-by=/usr/share/keyrings/wazuh.gpg] 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' - path: '/tmp/WAZUH-GPG-KEY' \ No newline at end of file diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml b/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml index 7107b057..60c89710 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml @@ -11,22 +11,22 @@ - name: Debian/Ubuntu | Download Filebeat apt key. get_url: - url: "{{ filebeatrepo.gpg }}" - dest: "{{ filebeatrepo.path }}" + url: "{{ wazuh_repo.gpg }}" + dest: "{{ wazuh_repo.path }}" - name: Import Filebeat GPG key - command: "gpg --no-default-keyring --keyring gnupg-ring:{{ filebeatrepo.keyring_path }} --import {{ filebeatrepo.path }}" + command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}" args: - creates: "{{ filebeatrepo.keyring_path }}" + creates: "{{ wazuh_repo.keyring_path }}" - name: Set permissions for Filebeat GPG key file: - path: "{{ filebeatrepo.keyring_path }}" + path: "{{ wazuh_repo.keyring_path }}" mode: '0644' - name: Debian/Ubuntu | Add Filebeat-oss repository. apt_repository: - repo: "{{ filebeatrepo.apt }}" + repo: "{{ wazuh_repo.apt }}" state: present update_cache: true changed_when: false diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/RMDebian.yml b/roles/wazuh/ansible-filebeat-oss/tasks/RMDebian.yml index a51e3f73..bc573eac 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/RMDebian.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/RMDebian.yml @@ -1,6 +1,6 @@ --- - name: Debian/Ubuntu | Remove Filebeat repository (and clean up left-over metadata) apt_repository: - repo: "{{ filebeatrepo.apt }}" + repo: "{{ wazuh_repo.apt }}" state: absent changed_when: false diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/RedHat.yml b/roles/wazuh/ansible-filebeat-oss/tasks/RedHat.yml index bdf4519b..9d1a0d12 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/RedHat.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/RedHat.yml @@ -3,7 +3,7 @@ yum_repository: name: wazuh_repo description: Wazuh Repo - baseurl: "{{ filebeatrepo.yum }}" - gpgkey: "{{ filebeatrepo.gpg }}" + baseurl: "{{ wazuh_repo.yum }}" + gpgkey: "{{ wazuh_repo.gpg }}" gpgcheck: true changed_when: false diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/main.yml b/roles/wazuh/ansible-filebeat-oss/tasks/main.yml index 3d2eff48..cb1f87a6 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/main.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/main.yml @@ -7,6 +7,9 @@ - include_vars: ../../vars/repo_pre-release.yml when: packages_repository == 'pre-release' +- include_vars: ../../vars/repo_staging.yml + when: packages_repository == 'staging' + - include_tasks: RedHat.yml when: ansible_os_family == 'RedHat' @@ -15,7 +18,7 @@ - name: Install Filebeat | Redhat yum: - name: "filebeat-{{ filebeat_version }}-1" + name: "filebeat-{{ filebeat_version }}" state: present lock_timeout: 200 register: install @@ -26,7 +29,7 @@ - name: Install Filebeat | Debian apt: - name: "filebeat={{ filebeat_version }}-1" + name: "filebeat={{ filebeat_version }}-*" state: present register: install tags: From c67e3f15d0d87f924d92dcadf70936b984f58519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Acu=C3=B1a?= Date: Wed, 16 Apr 2025 09:16:22 -0300 Subject: [PATCH 3/5] Bump 4.12.0 to beta1 --- VERSION.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.json b/VERSION.json index 6d01df04..5c1d3515 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1,4 +1,4 @@ { "version": "4.12.0", - "stage": "alpha1" + "stage": "beta1" } From 2b91bf0e500a6d0920743fda4bc310d4a1798f7a Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Fri, 25 Apr 2025 10:43:19 -0500 Subject: [PATCH 4/5] Add gnupg dependency --- CHANGELOG.md | 1 + .../ansible-filebeat-oss/tasks/Debian.yml | 3 ++- roles/wazuh/wazuh-dashboard/tasks/Debian.yml | 8 ++++++- roles/wazuh/wazuh-indexer/tasks/Debian.yml | 22 +++++++++---------- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe06a84..3a00ba11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Update the Filebeat installation for arm64 to include revision ([#1616](https://github.com/wazuh/wazuh-ansible/pull/1616)) +- Add gnupg dependency to indexer, filebeat-oss, and dashboard roles ([#1623](https://github.com/wazuh/wazuh-ansible/pull/1623)) ### Deleted diff --git a/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml b/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml index 60c89710..135f1e07 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml @@ -1,10 +1,11 @@ --- -- name: Debian/Ubuntu | Install apt-transport-https, ca-certificates and acl +- name: Debian/Ubuntu | Install apt-transport-https, ca-certificate, acl and gnupg apt: name: - apt-transport-https - ca-certificates - acl + - gnupg state: present register: filebeat_ca_packages_install until: filebeat_ca_packages_install is succeeded diff --git a/roles/wazuh/wazuh-dashboard/tasks/Debian.yml b/roles/wazuh/wazuh-dashboard/tasks/Debian.yml index 3f1f0c9d..2a09ac3d 100644 --- a/roles/wazuh/wazuh-dashboard/tasks/Debian.yml +++ b/roles/wazuh/wazuh-dashboard/tasks/Debian.yml @@ -6,7 +6,13 @@ get_url: url: "{{ wazuh_repo.gpg }}" dest: "{{ wazuh_repo.path }}" - + + - name: Debian/Ubuntu | Install gnupg + apt: + name: + - gnupg + state: present + - name: Import Wazuh repository GPG key command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}" args: diff --git a/roles/wazuh/wazuh-indexer/tasks/Debian.yml b/roles/wazuh/wazuh-indexer/tasks/Debian.yml index a0c7329f..7c1d83b2 100644 --- a/roles/wazuh/wazuh-indexer/tasks/Debian.yml +++ b/roles/wazuh/wazuh-indexer/tasks/Debian.yml @@ -5,16 +5,16 @@ apt: update_cache: yes -- name: Debian 9 (Stretch) - when: (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "9") - block: - - - name: Install Wazuh indexer dependencies - apt: - name: [ - 'unzip', 'wget', 'curl', 'apt-transport-https', software-properties-common - ] - state: present +- name: Install Wazuh indexer dependencies + apt: + name: + - unzip + - wget + - curl + - apt-transport-https + - software-properties-common + - gnupg + state: present - name: Add Wazuh indexer repository block: @@ -22,7 +22,7 @@ get_url: url: "{{ wazuh_repo.gpg }}" dest: "{{ wazuh_repo.path }}" - + - name: Import Wazuh repository GPG key command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}" args: From a521189a05cc26ad60651ea72eb4e10860b7e8ed Mon Sep 17 00:00:00 2001 From: Enrique Araque Date: Wed, 30 Apr 2025 11:11:44 +0200 Subject: [PATCH 5/5] Bump revision for 4.12.0-rc1 and fix changelog --- CHANGELOG.md | 4 ++-- VERSION.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a00ba11..f4641ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,13 +10,13 @@ All notable changes to this project will be documented in this file. ### Changed - Standardize version file format ([#1553](https://github.com/wazuh/wazuh-ansible/pull/1553)) -- Use fixed version of Ubuntu-22.04 in GHA runners instead of latest version ([#1479](https://github.com/wazuh/wazuh-ansible/pull/1479)) \- (PR Checks Workflows) - Implement minor changes for Wazuh ansible arm64 support ([#1518](https://github.com/wazuh/wazuh-ansible/pull/1518)) +- Use fixed version of Ubuntu-22.04 in GHA runners instead of latest version ([#1479](https://github.com/wazuh/wazuh-ansible/pull/1479)) \- (PR Checks Workflows) ### Fixed -- Update the Filebeat installation for arm64 to include revision ([#1616](https://github.com/wazuh/wazuh-ansible/pull/1616)) - Add gnupg dependency to indexer, filebeat-oss, and dashboard roles ([#1623](https://github.com/wazuh/wazuh-ansible/pull/1623)) +- Update the Filebeat installation for arm64 to include revision ([#1616](https://github.com/wazuh/wazuh-ansible/pull/1616)) ### Deleted diff --git a/VERSION.json b/VERSION.json index 5c1d3515..29e4047b 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1,4 +1,4 @@ { "version": "4.12.0", - "stage": "beta1" + "stage": "rc1" }