restructure ansible
This commit is contained in:
parent
6dfed51c55
commit
43145f8148
6 changed files with 33 additions and 33 deletions
|
@ -1,10 +1,40 @@
|
|||
- name: Install fluentbit
|
||||
hosts: hypervisors, vms
|
||||
|
||||
pre_tasks:
|
||||
handlers:
|
||||
- name: restart fluent-bit
|
||||
systemd:
|
||||
name: fluent-bit
|
||||
state: restarted
|
||||
|
||||
tasks:
|
||||
- name: Install packages
|
||||
apt:
|
||||
pkg: gpg
|
||||
|
||||
roles:
|
||||
- {role: fluentbit, tags: fluentbit}
|
||||
- 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: "fluent-bit.conf.j2"
|
||||
dest: /etc/fluent-bit/fluent-bit.conf
|
||||
notify: restart fluent-bit
|
||||
|
||||
- name: Copy fluent-bit parsers configuration
|
||||
template:
|
||||
src: "parsers.conf.j2"
|
||||
dest: /etc/fluent-bit/parsers.conf
|
||||
notify: restart fluent-bit
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
- name: restart fluent-bit
|
||||
systemd:
|
||||
name: fluent-bit
|
||||
state: restarted
|
|
@ -1,26 +0,0 @@
|
|||
- 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
|
||||
|
||||
- name: Copy fluent-bit parsers configuration
|
||||
template:
|
||||
src: "{{ role_path }}/parsers.conf.j2"
|
||||
dest: /etc/fluent-bit/parsers.conf
|
||||
notify: restart fluent-bit
|
Reference in a new issue