damex.incus.incus_network module – Ensure Incus network
Note
This module is part of the damex.incus collection (version 1.6.1).
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.
Synopsis
Create, update, and delete Incus networks via the Incus REST API.
Networks are project-scoped resources.
The network type is set on creation and cannot be changed afterwards.
Parameters
Parameter |
Comments |
|---|---|
Path to the client certificate for remote authentication. Requires |
|
Path to the client key for remote authentication. Requires |
|
Network configuration key-value pairs. Boolean values are converted to lowercase strings. Default: |
|
Override the next-hop for advertised IPv4 prefixes. |
|
Override the next-hop for advertised IPv6 prefixes. |
|
Bridge driver to use. Choices:
|
|
Comma-separated list of unconfigured NICs to bridge. |
|
MAC address for the bridge. |
|
Bridge MTU. |
|
Domain to advertise to DHCP clients and use for DNS resolution. |
|
DNS registration mode. Choices:
|
|
Comma-separated list of DNS nameservers. |
|
Comma-separated list of DNS search domains. |
|
Comma-separated list of DNS zone names for forward DNS records. |
|
DNS zone name for IPv4 reverse DNS records. |
|
DNS zone name for IPv6 reverse DNS records. |
|
Whether to register VLAN via GARP VLAN Registration Protocol. Choices:
|
|
IPv4 address for the bridge (use none or auto). |
|
Whether to allocate addresses via DHCP. Choices:
|
|
DHCP lease expiry time. |
|
Address of the gateway for the subnet. |
|
Comma-separated list of IPv4 DHCP ranges. |
|
Additional IPv4 routes to advertise via DHCP. |
|
Whether to generate filtering firewall rules. Choices:
|
|
Override gateway for the subnet. |
|
MAC address of the gateway. |
|
Whether to NAT IPv4 traffic. Choices:
|
|
Source address for outbound IPv4 NAT. |
|
Whether to add NAT rules before or after pre-existing rules. Choices:
|
|
Comma-separated list of additional IPv4 CIDR subnets to route to the bridge. |
|
Whether to allow overlapping routes on multiple networks. Choices:
|
|
Whether to route IPv4 traffic in and out of the bridge. Choices:
|
|
IPv6 address for the bridge (use none or auto). |
|
Whether to provide additional network configuration via DHCPv6. Choices:
|
|
DHCPv6 lease expiry time. |
|
Comma-separated list of IPv6 DHCP ranges. |
|
Whether to enable stateful DHCPv6 address allocation. Choices:
|
|
Whether to generate filtering firewall rules. Choices:
|
|
Override gateway for the subnet. |
|
MAC address of the gateway. |
|
Whether to NAT IPv6 traffic. Choices:
|
|
Source address for outbound IPv6 NAT. |
|
Whether to add NAT rules before or after pre-existing rules. Choices:
|
|
Comma-separated list of additional IPv6 CIDR subnets to route to the bridge. |
|
Whether to allow overlapping routes on multiple networks. Choices:
|
|
Whether to route IPv6 traffic in and out of the bridge. Choices:
|
|
MTU of the network interface. |
|
Parent interface to use for the network. |
|
Additional dnsmasq configuration to append. |
|
Comma-separated list of network ACLs to apply. |
|
Default action for egress traffic not matching any ACL rule. Choices:
|
|
Whether to log default egress actions. Choices:
|
|
Default action for ingress traffic not matching any ACL rule. Choices:
|
|
Whether to log default ingress actions. Choices:
|
|
VLAN ID to attach to. |
|
Comma-separated list of VLAN IDs to join for tagged traffic. |
|
Network description. Default: |
|
Name of the network. |
|
Incus project to query. Default: |
|
Path to the server certificate for remote verification. Requires |
|
Path to the Incus Unix socket for local connections. Default: |
|
Desired state of the network. Choices:
|
|
Token for remote authentication. Requires |
|
Network type. Required when creating a new network. Ignored on update — type cannot be changed after creation. Choices:
|
|
URL of the remote Incus server (e.g. https://host:8443). If specified, connects via HTTPS instead of Unix socket. |
|
Whether to validate the server TLS certificate. Choices:
|
|
Whether to wait for async operations to complete before returning. Set to Choices:
|
Examples
- name: Create bridge network
damex.incus.incus_network:
name: incusbr0
type: bridge
config:
ipv4.address: 10.0.0.1/24
ipv4.nat: true
- name: Remove network
damex.incus.incus_network:
name: incusbr0
state: absent