community.general.logstash_plugin module – Manage Logstash plugins

Note

This module is part of the community.general collection (version 10.0.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.logstash_plugin.

Synopsis

  • Manages Logstash plugins.

Parameters

Parameter

Comments

name

string / required

Install plugin with that name.

plugin_bin

path

Specify logstash-plugin to use for plugin management.

Default: "/usr/share/logstash/bin/logstash-plugin"

proxy_host

string

Proxy host to use during plugin installation.

proxy_port

string

Proxy port to use during plugin installation.

state

string

Apply plugin state.

Choices:

  • "present" ← (default)

  • "absent"

version

string

Specify plugin Version of the plugin to install. If plugin exists with previous version, it will NOT be updated.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- name: Install Logstash beats input plugin
  community.general.logstash_plugin:
    state: present
    name: logstash-input-beats

- name: Install specific version of a plugin
  community.general.logstash_plugin:
    state: present
    name: logstash-input-syslog
    version: '3.2.0'

- name: Uninstall Logstash plugin
  community.general.logstash_plugin:
    state: absent
    name: logstash-filter-multiline

- name: Install Logstash plugin with alternate heap size
  community.general.logstash_plugin:
    state: present
    name: logstash-input-beats
  environment:
    LS_JAVA_OPTS: "-Xms256m -Xmx256m"

Authors

  • Loic Blot (@nerzhul)