damex.incus.incus_network_forward_info module – Ensure Incus network forward information is gathered

Note

This module is part of the damex.incus collection (version 1.9.0).

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_network_forward_info.

Synopsis

  • Gather information about Incus network forwards via the Incus REST API.

  • Returns information about all forwards in a network or a specific forward.

  • Network forwards are project-scoped resources within a network.

Parameters

Parameter

Comments

client_cert

string

Client certificate content for remote authentication.

Requires url and client_key. Mutually exclusive with token and client_cert_path.

client_cert_path

string

Path to the client certificate for remote authentication.

Requires url and client_key_path. Mutually exclusive with token and client_cert.

client_key

string

Client key content for remote authentication.

Requires url and client_cert. Mutually exclusive with client_key_path.

client_key_path

string

Path to the client key for remote authentication.

Requires url and client_cert_path. Mutually exclusive with client_key.

name

string

Listen address of the network forward to query.

If not specified, all forwards in the network are returned.

network

string / required

Name of the network to query forwards from.

project

string

Incus project to query.

Default: "default"

server_cert

string

Server certificate content for remote verification.

Requires url. Mutually exclusive with server_cert_path.

server_cert_path

string

Path to the server certificate for remote verification.

Requires url. Mutually exclusive with server_cert.

socket_path

string

Path to the Incus Unix socket for local connections.

Default: "/var/lib/incus/unix.socket"

token

string

Token for remote authentication.

Requires url. Mutually exclusive with client_cert.

url

string

URL of the remote Incus server (e.g. https://host:8443).

If specified, connects via HTTPS instead of Unix socket.

validate_certs

boolean

Whether to validate the server TLS certificate.

Choices:

  • false

  • true ← (default)

Examples

- name: Ensure network forward information is gathered
  damex.incus.incus_network_forward_info:
    network: incusbr0
  register: result

- name: Ensure specific network forward information is gathered
  damex.incus.incus_network_forward_info:
    network: incusbr0
    name: 192.168.1.100
  register: result

- name: Ensure network forward information is gathered from project
  damex.incus.incus_network_forward_info:
    network: incusbr0
    project: myproject
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

network_forwards

list / elements=dictionary

List of network forward information.

Returned: always

config

dictionary

Forward configuration.

Returned: success

description

string

Forward description.

Returned: success

listen_address

string

Listen address of the forward.

Returned: success

ports

list / elements=string

Port forwarding rules.

Returned: success

Authors

  • Roman Kuzmitskii (@damex)