telekom_mms.icinga_director.icinga_director_inventory inventory – Returns Ansible inventory from Icinga
Note
This inventory plugin is part of the telekom_mms.icinga_director collection (version 2.2.0).
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 telekom_mms.icinga_director
.
To use it in a playbook, specify: telekom_mms.icinga_director.icinga_director_inventory
.
Synopsis
Returns Ansible inventory from Icinga
Parameters
Parameter |
Comments |
---|---|
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
|
PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
|
Create vars from jinja2 expressions. Default: |
|
If Choices:
|
|
Credentials specified with `url_username` and `url_password` should be passed in HTTP Header. Choices:
|
|
Add hosts to group based on Jinja2 conditionals. Default: |
|
Header to identify as, generally appears in web server logs. Default: |
|
Add hosts to group based on the values of a variable. Default: |
|
The default value when the host variable’s value is an empty string. This option is mutually exclusive with |
|
The key from input dictionary used to generate groups. |
|
parent group for keyed group. |
|
A keyed group name will start with this prefix. Default: |
|
separator used to build the keyed group name. Default: |
|
Set this option to This option is mutually exclusive with Choices:
|
|
Use in conjunction with By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is Set this option to If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. Choices:
|
|
Name of the plugin Choices:
|
|
If Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. Choices:
|
|
Icinga URL to connect to |
|
The password for use in HTTP basic authentication. If the `url_username` parameter is not specified, the `url_password` parameter will not be used. |
|
The username for use in HTTP basic authentication. This parameter can be used without `url_password` for sites that allow empty passwords |
|
Merge extra vars into the available variables for composition (highest precedence). Choices:
Configuration:
|
|
Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>` to be installed. Credentials for GSSAPI can be specified with `url_username`/ `url_password` or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. Choices:
|
|
If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. Choices:
|
|
If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. Choices:
|
Examples
plugin: telekom_mms.icinga_director.icinga_director_inventory
url: 'https://example.com'
url_username: foo
url_password: bar
force_basic_auth: False
strict: False
# use the object_name you defined as hostname
compose:
hostname: object_name
# create a group based on the operating system defined in a custom variable
keyed_groups:
- prefix: os
key: vars.HostOS
# create groups based on jinja templates
# here we create a group called "rb" if the host variable "check_period" is "24/7"
groups:
rb: check_period == "24/7"