damex.incus.incus_network_forwards role – Ensure Incus network forwards.
Note
This role 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_network_forwards.
Entry point main – Ensure Incus network forwards.
Synopsis
Ensure Incus network forwards.
Parameters
Parameter |
Comments |
|---|---|
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. |
|
Port forwarding rules. |
|
Description of the port rule. |
|
Port or port range to listen on. |
|
Network protocol to forward. Choices:
|
|
Traffic source address rewriting. 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. |
|
TLS client certificate path for API authentication. |
|
Client key content for API authentication. |
|
TLS client key path for API authentication. |
|
Default network for network forwards. |
|
Default Incus project for network forwards. |
|
Server certificate content for API verification. |
|
TLS server certificate path for API verification. |
|
Incus Unix socket path. |
|
Default desired state of the network forwards. Choices:
|
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
TLS certificate validation. 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