add fluent-bit for physical servers
This commit is contained in:
parent
0c7ee6b1bc
commit
d8342c3067
5 changed files with 137 additions and 0 deletions
20
ansible/roles/fluentbit/tasks/main.yml
Normal file
20
ansible/roles/fluentbit/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- name: Install APT key
|
||||
apt_key:
|
||||
url: https://packages.fluentbit.io/fluentbit.key
|
||||
state: present
|
||||
|
||||
- name: Install APT repository
|
||||
apt_repository:
|
||||
repo: "deb https://packages.fluentbit.io/debian/{{ ansible_distribution_release }} {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install fluent-bit
|
||||
apt:
|
||||
name: fluent-bit
|
||||
|
||||
- name: Copy fluent-bit configuration
|
||||
template:
|
||||
src: "{{ role_path }}/fluent-bit.conf.j2"
|
||||
dest: /etc/fluent-bit/fluent-bit.conf
|
||||
notify: restart fluent-bit
|
Reference in a new issue