damex.incus.incus_instance_info module – Ensure Incus instance information is gathered
Note
This module is part of the damex.incus collection (version 1.11.7).
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 damex.incus.
To use it in a playbook, specify: damex.incus.incus_instance_info.
Synopsis
Gather information about Incus instances via the Incus REST API.
Returns information about all instances or a specific instance.
Parameters
Parameter |
Comments |
|---|---|
Client certificate content for remote authentication. Requires |
|
Client certificate path for remote authentication. Requires |
|
Client key content for remote authentication. Requires |
|
Client key path for remote authentication. Requires |
|
Name of the instance to query. If not specified, all instances in the project are returned. |
|
Incus project to query. Default: |
|
Server certificate content for remote verification. Requires |
|
Server certificate path for remote verification. Requires |
|
Incus Unix socket path for local connections. Default: |
|
Token for remote authentication. Requires |
|
Remote Incus server URL (e.g. https://host:8443). If specified, connects via HTTPS instead of Unix socket. |
|
Server TLS certificate validation. Choices:
|
Examples
- name: Ensure instance information is gathered
damex.incus.incus_instance_info:
project: default
register: result
- name: Ensure specific instance information is gathered
damex.incus.incus_instance_info:
name: myinstance
project: default
register: result
- name: Ensure instance information is gathered from remote server
damex.incus.incus_instance_info:
url: https://incus.example.com:8443
client_cert_path: /etc/incus/client.crt
client_key_path: /etc/incus/client.key
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
List of instance information. Returned: always |
|
Instance configuration. Returned: success |
|
Instance devices. Returned: success |
|
Name of the instance. Returned: success |
|
Profiles applied to the instance. Returned: success |
|
Project the instance belongs to. Returned: success |
|
Status of the instance. Returned: success |
|
Type of the instance (container or virtual-machine). Returned: success |