wazuh-ansible-4.8.1/roles/wazuh/ansible-filebeat-oss/tasks/Debian.yml
David Correa Rodríguez 02b72932eb
Fixed apt_key deprecation
2024-05-21 17:38:02 +02:00

33 lines
904 B
YAML

---
- name: Debian/Ubuntu | Install apt-transport-https, ca-certificates and acl
apt:
name:
- apt-transport-https
- ca-certificates
- acl
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 }}"
- name: Import Filebeat GPG key
command: "gpg --no-default-keyring --keyring gnupg-ring:{{ filebeatrepo.keyring_path }} --import {{ filebeatrepo.path }}"
args:
creates: "{{ filebeatrepo.keyring_path }}"
- name: Set permissions for Filebeat GPG key
file:
path: "{{ filebeatrepo.keyring_path }}"
mode: '0644'
- name: Debian/Ubuntu | Add Filebeat-oss repository.
apt_repository:
repo: "{{ filebeatrepo.apt }}"
state: present
update_cache: true
changed_when: false