Merge branch '4.12.1' into merge-4.12.1-into-4.12.2

This commit is contained in:
Enrique Araque 2025-05-08 09:31:49 +02:00
commit 8f586c73eb
No known key found for this signature in database
GPG Key ID: 29A3281A91360096
8 changed files with 36 additions and 32 deletions

View File

@ -46,12 +46,13 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- Standardize version file format ([#1553](https://github.com/wazuh/wazuh-ansible/pull/1553)) - 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)) - 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 ### 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 ### Deleted

View File

@ -20,10 +20,3 @@ filebeat_ssl_dir: /etc/pki/filebeat
# Local path to store the generated certificates (Opensearch security plugin) # Local path to store the generated certificates (Opensearch security plugin)
local_certs_path: "{{ playbook_dir }}/indexer/certificates" 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'

View File

@ -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: apt:
name: name:
- apt-transport-https - apt-transport-https
- ca-certificates - ca-certificates
- acl - acl
- gnupg
state: present state: present
register: filebeat_ca_packages_install register: filebeat_ca_packages_install
until: filebeat_ca_packages_install is succeeded until: filebeat_ca_packages_install is succeeded
- name: Debian/Ubuntu | Download Filebeat apt key. - name: Debian/Ubuntu | Download Filebeat apt key.
get_url: get_url:
url: "{{ filebeatrepo.gpg }}" url: "{{ wazuh_repo.gpg }}"
dest: "{{ filebeatrepo.path }}" dest: "{{ wazuh_repo.path }}"
- name: Import Filebeat GPG key - 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: args:
creates: "{{ filebeatrepo.keyring_path }}" creates: "{{ wazuh_repo.keyring_path }}"
- name: Set permissions for Filebeat GPG key - name: Set permissions for Filebeat GPG key
file: file:
path: "{{ filebeatrepo.keyring_path }}" path: "{{ wazuh_repo.keyring_path }}"
mode: '0644' mode: '0644'
- name: Debian/Ubuntu | Add Filebeat-oss repository. - name: Debian/Ubuntu | Add Filebeat-oss repository.
apt_repository: apt_repository:
repo: "{{ filebeatrepo.apt }}" repo: "{{ wazuh_repo.apt }}"
state: present state: present
update_cache: true update_cache: true
changed_when: false changed_when: false

View File

@ -1,6 +1,6 @@
--- ---
- name: Debian/Ubuntu | Remove Filebeat repository (and clean up left-over metadata) - name: Debian/Ubuntu | Remove Filebeat repository (and clean up left-over metadata)
apt_repository: apt_repository:
repo: "{{ filebeatrepo.apt }}" repo: "{{ wazuh_repo.apt }}"
state: absent state: absent
changed_when: false changed_when: false

View File

@ -3,7 +3,7 @@
yum_repository: yum_repository:
name: wazuh_repo name: wazuh_repo
description: Wazuh Repo description: Wazuh Repo
baseurl: "{{ filebeatrepo.yum }}" baseurl: "{{ wazuh_repo.yum }}"
gpgkey: "{{ filebeatrepo.gpg }}" gpgkey: "{{ wazuh_repo.gpg }}"
gpgcheck: true gpgcheck: true
changed_when: false changed_when: false

View File

@ -7,6 +7,9 @@
- include_vars: ../../vars/repo_pre-release.yml - include_vars: ../../vars/repo_pre-release.yml
when: packages_repository == 'pre-release' when: packages_repository == 'pre-release'
- include_vars: ../../vars/repo_staging.yml
when: packages_repository == 'staging'
- include_tasks: RedHat.yml - include_tasks: RedHat.yml
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
@ -26,7 +29,7 @@
- name: Install Filebeat | Debian - name: Install Filebeat | Debian
apt: apt:
name: "filebeat={{ filebeat_version }}" name: "filebeat={{ filebeat_version }}-*"
state: present state: present
register: install register: install
tags: tags:

View File

@ -6,7 +6,13 @@
get_url: get_url:
url: "{{ wazuh_repo.gpg }}" url: "{{ wazuh_repo.gpg }}"
dest: "{{ wazuh_repo.path }}" dest: "{{ wazuh_repo.path }}"
- name: Debian/Ubuntu | Install gnupg
apt:
name:
- gnupg
state: present
- name: Import Wazuh repository GPG key - name: Import Wazuh repository GPG key
command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}" command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}"
args: args:

View File

@ -5,16 +5,16 @@
apt: apt:
update_cache: yes update_cache: yes
- name: Debian 9 (Stretch) - name: Install Wazuh indexer dependencies
when: (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "9") apt:
block: name:
- unzip
- name: Install Wazuh indexer dependencies - wget
apt: - curl
name: [ - apt-transport-https
'unzip', 'wget', 'curl', 'apt-transport-https', software-properties-common - software-properties-common
] - gnupg
state: present state: present
- name: Add Wazuh indexer repository - name: Add Wazuh indexer repository
block: block:
@ -22,7 +22,7 @@
get_url: get_url:
url: "{{ wazuh_repo.gpg }}" url: "{{ wazuh_repo.gpg }}"
dest: "{{ wazuh_repo.path }}" dest: "{{ wazuh_repo.path }}"
- name: Import Wazuh repository GPG key - name: Import Wazuh repository GPG key
command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}" command: "gpg --no-default-keyring --keyring gnupg-ring:{{ wazuh_repo.keyring_path }} --import {{ wazuh_repo.path }}"
args: args: