34 lines
881 B
YAML
Executable file
34 lines
881 B
YAML
Executable file
---
|
|
- name: Check if fluent-bit is installed
|
|
ansible.builtin.command: dpkg -l fluent-bit
|
|
register: fluent_bit_check
|
|
ignore_errors: true
|
|
changed_when: false
|
|
|
|
- name: Fluent-bit install
|
|
ansible.builtin.shell: "curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh"
|
|
when: fluent_bit_check.rc != 0
|
|
|
|
- name: Copy fluent-bit conf
|
|
ansible.builtin.copy:
|
|
src: files/fluent-bit.conf
|
|
dest: /etc/fluent-bit/fluent-bit.conf
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: Copy input output conf
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: /etc/fluent-bit/
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
loop: "{{ lookup('fileglob', 'files/ptaf-*', wantlist=True) }}"
|
|
|
|
- name: Ensure fluent-bit service is running and enabled
|
|
ansible.builtin.service:
|
|
name: fluent-bit
|
|
state: restarted
|
|
enabled: true
|
|
...
|