mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 08:51:37 +01:00
add: filebeat
This commit is contained in:
33
roles/filebeat/tasks/main.yaml
Normal file
33
roles/filebeat/tasks/main.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
- name: Add Elastic GPG key
|
||||
ansible.builtin.apt_key:
|
||||
url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||
state: present
|
||||
|
||||
- name: Ensure apt-transport-https is installed
|
||||
ansible.builtin.apt:
|
||||
name: apt-transport-https
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Add Elastic repository (OSS package)
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/apt/sources.list.d/elastic-8.x.list
|
||||
content: "deb https://artifacts.elastic.co/packages/oss-8.x/apt stable main\n"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install Filebeat
|
||||
ansible.builtin.apt:
|
||||
name: filebeat
|
||||
state: present
|
||||
|
||||
- name: Enable Filebeat to start on boot
|
||||
ansible.builtin.systemd:
|
||||
name: filebeat
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user