damex.incus.incus_networks role – Ensure Incus networks.
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_networks.
Entry point main – Ensure Incus networks.
Synopsis
Ensure Incus networks.
Parameters
Parameter |
Comments |
|---|---|
Networks to ensure. |
|
Network configuration options. |
|
Override the next-hop for advertised IPv4 prefixes. |
|
Override the next-hop for advertised IPv6 prefixes. |
|
BGP peers for OVN downstream networks. |
|
IP address of the BGP peer. |
|
Autonomous System Number of the BGP peer. |
|
Hold time in seconds for the BGP session. |
|
Name identifier for the BGP peer. |
|
Password for the BGP session. |
|
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. |
|
GARP VLAN Registration Protocol. Choices:
|
|
IPv4 address for the bridge (use none or auto). |
|
DHCP address allocation. 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. |
|
Filtering firewall rule generation. Choices:
|
|
Override gateway for the subnet. |
|
MAC address of the gateway. |
|
IPv4 NAT. Choices:
|
|
Source address for outbound IPv4 NAT. |
|
NAT rule placement relative to pre-existing rules. Choices:
|
|
Comma-separated list of additional IPv4 CIDR subnets to route to the bridge. |
|
Overlapping route allowance on multiple networks. Choices:
|
|
IPv4 bridge traffic routing. Choices:
|
|
IPv6 address for the bridge (use none or auto). |
|
Additional DHCPv6 network configuration. Choices:
|
|
DHCPv6 lease expiry time. |
|
Comma-separated list of IPv6 DHCP ranges. |
|
Stateful DHCPv6 address allocation. Choices:
|
|
Filtering firewall rule generation. Choices:
|
|
Override gateway for the subnet. |
|
MAC address of the gateway. |
|
IPv6 NAT. Choices:
|
|
Source address for outbound IPv6 NAT. |
|
NAT rule placement relative to pre-existing rules. Choices:
|
|
Comma-separated list of additional IPv6 CIDR subnets to route to the bridge. |
|
Overlapping route allowance on multiple networks. Choices:
|
|
IPv6 bridge traffic routing. 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:
|
|
Default egress action logging. Choices:
|
|
Default action for ingress traffic not matching any ACL rule. Choices:
|
|
Default ingress action logging. Choices:
|
|
Tunnels for bridge networks. |
|
Multicast address for VXLAN tunnels. |
|
Tunnel ID for VXLAN tunnels. |
|
Host interface to use for the tunnel. |
|
Local address for the tunnel. |
|
Name identifier for the tunnel. |
|
Destination UDP port for VXLAN tunnels. |
|
Tunneling protocol. Choices:
|
|
Remote address for the tunnel. |
|
TTL for multicast routing topologies. |
|
VLAN ID to attach to. |
|
Comma-separated list of VLAN IDs to join for tagged traffic. |
|
Network description. |
|
Name of the network. |
|
Incus project to scope the network to. |
|
Desired state of the network. Choices:
|
|
Cluster members to create the network on. |
|
Per-member network configuration options. |
|
Override the next-hop for advertised IPv4 prefixes. |
|
Override the next-hop for advertised IPv6 prefixes. |
|
Comma-separated list of unconfigured NICs to bridge. |
|
Parent interface to use for the network. |
|
Per-member tunnel configuration. |
|
Host interface for tunnel. |
|
Local address for tunnel. |
|
Tunnel name identifier. |
|
Name of the cluster member. |
|
Desired state of this cluster member’s network entry. Choices:
|
|
Type of the network. 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. |
|
Incus project to scope networks to. |
|
Server certificate content for API verification. |
|
TLS server certificate path for API verification. |
|
Incus Unix socket path. |
|
Desired state of the networks. Choices:
|
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
TLS certificate validation. Choices:
|
Examples
- name: Ensure incus networks
hosts: incus
tasks:
- name: Ensure incus networks
ansible.builtin.import_role:
name: damex.incus.incus_networks
vars:
incus_networks:
- name: incusbr0
type: bridge
config:
ipv4.address: 10.0.0.1/24
ipv4.nat: "true"
ipv6.address: none
- name: incusbr1
type: bridge
config:
ipv4.address: none
ipv6.address: none
targets:
- name: node1.example.com
config:
bridge.external_interfaces: enp3s0f0
- name: node2.example.com
config:
bridge.external_interfaces: enp4s0f0
- name: bgpbr0
type: bridge
config:
ipv4.address: 10.12.102.1/24
ipv4.nat: "false"
bgp_peers:
- name: router
address: 10.12.101.1
asn: 64601
- name: multibr0
type: bridge
config:
ipv4.address: 10.0.0.1/24
tunnels:
- name: site2
protocol: vxlan
local: 192.168.1.1
remote: 192.168.1.2
id: 100