damex.incus.incus_network_address_set module – Ensure Incus network address set
Note
This module 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_address_set.
Synopsis
Create, update, and delete Incus network address sets via the Incus REST API.
Network address sets define reusable groups of IPv4 and IPv6 addresses that can be referenced in network ACL rules.
Address sets are referenced in ACL source and destination fields using a dollar sign prefix (e.g. $set_name).
Parameters
Parameter |
Comments |
|---|---|
List of IPv4 or IPv6 addresses, with or without CIDR suffix. A mix of IPv4, IPv6, and CIDR notation is supported. |
|
Client certificate content for remote authentication. Requires |
|
Client certificate path for remote authentication. Requires |
|
Client key content for remote authentication. Requires |
|
Client key path for remote authentication. Requires |
|
User-defined configuration entries. Each entry is flattened to a |
|
Configuration key name (without the user. prefix). |
|
Configuration value. |
|
Description of the network address set. Default: |
|
Name of the network address set. |
|
Incus project to query. Default: |
|
Server certificate content for remote verification. Requires |
|
Server certificate path for remote verification. Requires |
|
Incus Unix socket path for local connections. Default: |
|
Desired state of the network address set. Choices:
|
|
Token for remote authentication. Requires |
|
Remote Incus server URL (e.g. https://host:8443). If specified, connects via HTTPS instead of Unix socket. |
|
Server TLS certificate validation. Choices:
|
|
Async operation completion wait. Set to Choices:
|
Examples
- name: Ensure network address set with IPv4 addresses
damex.incus.incus_network_address_set:
name: web_servers
description: Web server addresses
addresses:
- 10.0.0.5
- 10.0.0.6
- name: Ensure network address set with mixed addresses
damex.incus.incus_network_address_set:
name: dns_servers
addresses:
- 10.0.0.10
- 2001:db8::1
- 192.168.1.0/24
- name: Ensure network address set is absent
damex.incus.incus_network_address_set:
name: web_servers
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Resource state change indicator. Returned: always |
|
Configuration keys that changed. Returned: always |
|
Before and after state for diff mode. Returned: changed |
|
State after the change. Returned: success |
|
State before the change. Returned: success |