community.general.icinga2_host – Manage a host in Icinga2¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.icinga2_host
.
Synopsis¶
Add or remove a host to Icinga2 through the API.
See https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/
Parameters¶
Examples¶
- name: Add host to icinga
community.general.icinga2_host:
url: "https://icinga2.example.com"
url_username: "ansible"
url_password: "a_secret"
state: present
name: "{{ ansible_fqdn }}"
ip: "{{ ansible_default_ipv4.address }}"
variables:
foo: "bar"
delegate_to: 127.0.0.1
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
data
dictionary
|
always |
The data structure used for create, modify or delete of the host
|
name
string
|
always |
The name used to create, modify or delete the host
|
Authors¶
Jurgen Brand (@t794104)