I have been trying to get host info as well as trying to add a test device, but the API call seems to ignore anything passed via 'body'.
For instance, this will just result in EVERY host being returned:
Code: Select all
- name: get host config
uri:
url: https://SERVERNAME/nagiosxi/api/v1/config/host?apikey=APIKEY
method: GET
body: 'host_name=blah001'
validate_certs: no
register: get_host_resultsCode: Select all
- name: Get host config
uri:
url: https://SERVERNAME/nagiosxi/api/v1/config/host?apikey=APIKEY&host_name=blah001.domain.net
method: GET
# body: 'host_name=blah001.domain.net'
validate_certs: no
register: get_host_results