damex.incus.incus_network_acls role – Ensure Incus network ACLs.
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_acls.
Entry point main – Ensure Incus network ACLs.
Synopsis
Ensure Incus network ACLs.
Parameters
Parameter |
Comments |
|---|---|
List of Incus network ACLs to ensure. |
|
ACL configuration key-value pairs (user.* keys only). |
|
Description of the network ACL. |
|
List of egress (outbound) traffic rules. |
|
Action to perform on rule match. Choices:
|
|
Description of the rule. |
|
Destination address (CIDR, IP range, or selector). |
|
Destination port or port range for TCP/UDP. |
|
ICMP code number. |
|
ICMP type number. |
|
Network protocol to match. Choices:
|
|
Source address (CIDR, IP range, or selector). |
|
Source port or port range for TCP/UDP. |
|
State of the rule. Choices:
|
|
List of ingress (inbound) traffic rules. |
|
Action to perform on rule match. Choices:
|
|
Description of the rule. |
|
Destination address (CIDR, IP range, or selector). |
|
Destination port or port range for TCP/UDP. |
|
ICMP code number. |
|
ICMP type number. |
|
Network protocol to match. Choices:
|
|
Source address (CIDR, IP range, or selector). |
|
Source port or port range for TCP/UDP. |
|
State of the rule. Choices:
|
|
Name of the network ACL. |
|
Incus project for the network ACL. |
|
Desired state of the network ACL. 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 Incus project for network ACLs. |
|
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 ACLs. Choices:
|
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
Whether to validate TLS certificates. Choices:
|
Examples
- name: Ensure incus network acls
hosts: incus
tasks:
- name: Ensure incus network acls
ansible.builtin.import_role:
name: damex.incus.incus_network_acls
vars:
incus_network_acls:
- name: web
description: Web server ACL
ingress:
- action: allow
source: "@internal"
protocol: tcp
destination_port: "80,443"
description: Allow HTTP and HTTPS
egress:
- action: allow
destination: 8.8.8.8/32,8.8.4.4/32
protocol: udp
destination_port: "53"
description: Allow DNS queries
- name: deny-all
ingress:
- action: drop
egress:
- action: drop