- name: install fluent-bit gather_facts: yes hosts: servers become: false # we are root already tasks: # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/deb822_repository_module.html - name: add fluentbit repository for debian/ubuntu ansible.builtin.deb822_repository: name: fluentbit types: deb uris: https://packages.fluentbit.io/{{ansible_distribution}}/{{ansible_distribution_release}} suites: '{{ansible_distribution_release}}' components: main architectures: amd64 signed_by: https://packages.fluentbit.io/fluentbit.key when: ansible_os_family == 'Debian' # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html - name: install fluentbit for debian/ubuntu ansible.builtin.apt: name: - sysstat - fluent-bit state: latest when: ansible_os_family == 'Debian'