community.general.icinga2 – Icinga2 inventory source

Note

This plugin is part of the community.general collection (version 3.8.3).

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.icinga2.

New in version 3.7.0: of community.general

Synopsis

  • Get inventory hosts from the Icinga2 API.

  • Uses a configuration file as an inventory source, it must end in .icinga2.yml or .icinga2.yaml.

Parameters

Parameter

Comments

host_filter

string

An Icinga2 API valid host filter.

password

string / required

Password to query the API.

plugin

string / required

Name of the plugin.

Choices:

  • community.general.icinga2

url

string / required

Root URL of Icinga2 API.

user

string / required

Username to query the API.

validate_certs

boolean

Enables or disables SSL certificate verification.

Choices:

  • no

  • yes ← (default)

Examples

# my.icinga2.yml
plugin: community.general.icinga2
url: http://localhost:5665
user: ansible
password: secure
host_filter: \"linux-servers\" in host.groups
validate_certs: false

Authors