damex.incus.incus_network_forwards role – Ensure Incus network forwards.
Note
This role 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_forwards.
Entry point main – Ensure Incus network forwards.
Synopsis
Ensure Incus network forwards.
Parameters
Parameter |
Comments |
|---|---|
List of Incus network forwards to ensure. |
|
Network forward configuration key-value pairs. |
|
Default target address for traffic not matching any port rule. |
|
Description of the network forward. |
|
Listen address of the network forward. |
|
Name of the network containing the forward. |
|
List of port forwarding rules. |
|
Description of the port rule. |
|
Port or port range to listen on. |
|
Network protocol to forward. Choices:
|
|
Whether to rewrite traffic source address. Choices:
|
|
Target address to forward traffic to. |
|
Target port or port range. |
|
Incus project for the network forward. |
|
Desired state of the network forward. Choices:
|
|
Client certificate content for API authentication. |
|
Path to the TLS client certificate for API authentication. |
|
Client key content for API authentication. |
|
Path to the TLS client key for API authentication. |
|
Default network for network forwards. |
|
Default Incus project for network forwards. |
|
Server certificate content for API verification. |
|
Path to the TLS server certificate for API verification. |
|
Path to the Incus Unix socket. |
|
Default desired state of the network forwards. Choices:
|
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
Whether to validate TLS certificates. Choices:
|
Examples
- name: Ensure incus network forwards
hosts: incus
tasks:
- name: Ensure incus network forwards
ansible.builtin.import_role:
name: damex.incus.incus_network_forwards
vars:
incus_network_forwards_network: incusbr0
incus_network_forwards:
- name: 192.168.1.100
description: Web server forward
config:
target_address: 10.0.0.5
ports:
- protocol: tcp
listen_port: 80,443
target_address: 10.0.0.5
- name: 192.168.1.101
config:
target_address: 10.0.0.10