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
|
### 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
|
### Deleted
|
||||||
|
|
||||||
|
|||||||
@ -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'
|
|
||||||
@ -11,22 +11,22 @@
|
|||||||
|
|
||||||
- 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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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'
|
||||||
|
|
||||||
@ -15,7 +18,7 @@
|
|||||||
|
|
||||||
- name: Install Filebeat | Redhat
|
- name: Install Filebeat | Redhat
|
||||||
yum:
|
yum:
|
||||||
name: "filebeat-{{ filebeat_version }}-1"
|
name: "filebeat-{{ filebeat_version }}"
|
||||||
state: present
|
state: present
|
||||||
lock_timeout: 200
|
lock_timeout: 200
|
||||||
register: install
|
register: install
|
||||||
@ -26,7 +29,7 @@
|
|||||||
|
|
||||||
- name: Install Filebeat | Debian
|
- name: Install Filebeat | Debian
|
||||||
apt:
|
apt:
|
||||||
name: "filebeat={{ filebeat_version }}-1"
|
name: "filebeat={{ filebeat_version }}-*"
|
||||||
state: present
|
state: present
|
||||||
register: install
|
register: install
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user