rhub.rhub.rhub_api lookup – Interacts with Resource Hub API.
Note
This lookup plugin is part of the rhub.rhub collection.
To install it, use: ansible-galaxy collection install rhub.rhub.
To use it in a playbook, specify: rhub.rhub.rhub_api.
Synopsis
Retrieve data from Resource Hub API.
Terms
Parameter |
Comments |
|---|---|
API endpoint path. |
Parameters
Parameter |
Comments |
|---|---|
Resource Hub base address. If not set the environment variable Configuration:
|
|
API auth token. If not set the environment variable Configuration:
|
Examples
- name: get cluster info
ansible.builtin.debug:
msg: "{{ lookup('rhub.rhub.rhub_api', '/v0/lab/cluster/1', addr='https://rhub.stage.example.com/') }}"
Return Value
Key |
Description |
|---|---|
Data returned from the API or problem data (RFC 7807). Returned: success |
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.