W3cubDocs

/Ansible

community.general.icinga2 – Icinga2 inventory source

Note

This plugin is part of the community.general collection (version 3.8.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.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 Choices/Defaults Configuration Comments
host_filter
string
An Icinga2 API valid host filter.
password
string / required
Password to query the API.
plugin
string / required
    Choices:
  • community.general.icinga2
Name of the plugin.
url
string / required
Root URL of Icinga2 API.
user
string / required
Username to query the API.
validate_certs
boolean
    Choices:
  • no
  • yes
Enables or disables SSL certificate verification.

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

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/icinga2_inventory.html