Use 'wazuh_repo' variable instead of 'filebeatrepo'
This commit is contained in:
parent
6525691769
commit
da6d2c34a0
@ -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
|
||||
|
||||
|
||||
@ -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'
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user