Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy
driver:
name: docker
lint:
lint:
name: yamllint
platforms:
- name: fluentbit_centos7_instance
Expand Down
7 changes: 5 additions & 2 deletions tasks/install-RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---

- name: Install Redhat | Add yum repository
- name: Install Redhat | Detect Centos/Rocky linux version
set_fact: distro_version="{{ ansible_distribution_version|int }}"

- name: Install Redhat | "Add yum repository for {{ ansible_distribution }}-{{ distro_version }}"
yum_repository:
name: TD_Agent_Bit
baseurl: http://packages.fluentbit.io/centos/7/$basearch/
baseurl: "http://packages.fluentbit.io/centos/{{ distro_version }}/$basearch/"
gpgcheck: true
gpgkey: http://packages.fluentbit.io/fluentbit.key
description: Fluent bit repo
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
# tasks file for ansible-role-fluentbit

# - debug: msg="{{ 'Systemd_Filter:0' | split(':') | first }}"

- name: Install Fluentbit
include_tasks: 'install-{{ ansible_os_family }}.yml'
tags: ['install']
Expand Down
4 changes: 2 additions & 2 deletions templates/td-agent-bit.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
{% for input in fluentbit_inputs %}
[INPUT]
{% for key in input %}
{{ key }} {{ input[key] }}
{{ key | split(':') | first }} {{ input[key] }}
{% endfor %}
{% endfor %}

{% for input in fluentbit_outputs %}
[OUTPUT]
{% for key in input %}
{{ key }} {{ input[key] }}
{{ key | split(':') | first }} {{ input[key] }}
{% endfor %}
{% endfor %}

Expand Down