diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c960dc3..246bbbe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,24 @@ All notable changes to this project will be documented in this file. - Remove 'stable' branch ocurrencies ([#1593](https://github.com/wazuh/wazuh-ansible/pull/1593)) +## [4.12.2] + +### Added + +- None + +### Changed + +- None + +### Fixed + +- None + +### Deleted + +- None + ## [4.12.1] ### Added @@ -46,12 +64,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 -- None +- 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/roles/wazuh/ansible-filebeat-oss/defaults/main.yml b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml index 4236dba3..70a645ea 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..135f1e07 100644 --- a/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml +++ b/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml @@ -1,32 +1,33 @@ --- -- 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 - 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 d4255a68..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' @@ -26,7 +29,7 @@ - name: Install Filebeat | Debian apt: - name: "filebeat={{ filebeat_version }}" + name: "filebeat={{ filebeat_version }}-*" state: present register: install tags: 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: