community.proxmox.proxmox_zone module – Manage Proxmox zone configurations.
Note
This module is part of the community.proxmox collection (version 1.6.0).
You might already have this collection installed if you are using the ansible package. 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 community.proxmox. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.proxmox.proxmox_zone.
New in community.proxmox 1.4.0
Synopsis
- Create/Update/Delete proxmox sdn zones.
Requirements
The below requirements are needed on the host that executes this module.
- proxmoxer >= 2.0
- requests
Parameters
Parameter | Comments |
|---|---|
advertise_subnets boolean | Advertise EVPN subnets if you have silent hosts. Choices:
|
api_host string / required | Specify the target host of the Proxmox VE cluster. Uses the |
api_password string | Specify the password to authenticate with. Uses the |
api_port integer | Specify the target port of the Proxmox VE cluster. Uses the |
api_timeout integer | Time limit for requests towards the Proxmox VE API. Default: |
api_token_id string | Specify the token ID. Uses the |
api_token_secret string | Specify the token secret. Uses the |
api_user string / required | Specify the user to authenticate with. Uses the |
bridge string | Specify the bridge interface to use. |
bridge_disable_mac_learning boolean | Disable auto MAC address learning on the bridge interface. Choices:
|
ca_path path | Path to a local certificate, which will be used to verify TLS connections. Ignored if |
controller string | FRR router name. |
dhcp string | Type of the DHCP backend for this zone. Choices:
|
disable_arp_nd_suppression boolean | Disable IPv4 ARP and IPv6 neighbour discovery suppression. Choices:
|
dns string | DNS API server. |
dnszone string | DNS domain zone. |
dp_id integer | Faucet dataplane ID. |
exitnodes string | List of cluster node names. |
exitnodes_local_routing boolean | Allow exitnodes to connect to EVPN guests. Choices:
|
exitnodes_primary string | Force traffic to this exit node first. |
fabric string | |
ipam string | Use a specific IPAM. |
mac string | Anycast logical router MAC address. |
mtu integer | Set the Maximum Transmission Unit (MTU). |
nodes string | List of cluster node names. |
peers string | |
reversedns string | Reverse DNS API server. |
rt_import string | Route-Target import. |
state string | The desired state of the zone configuration. Choices:
|
tag integer | Service-VLAN tag. |
type string | Specify the type of zone. Choices:
|
update boolean | |
validate_certs boolean | Validate the TLS certificates used for the connection to the Proxmox VE API. Currently defaults to Uses the Choices:
|
vlan_protocol string | Specify the VLAN protocol to use. Choices:
|
vrf_vxlan integer | Specify the VRF VXLAN identifier. |
vxlan_port integer | VXLAN tunnel UDP port (default 4789). |
zone string | Unique zone name. |
Attributes
Attribute | Support | Description |
|---|---|---|
action_group | Action group: community.proxmox.proxmox | Use |
check_mode | Support: none | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create a simple zone
community.proxmox.proxmox_zone:
api_user: "root@pam"
api_password: "{{ vault.proxmox.root_password }}"
api_host: "{{ pc.proxmox.api_host }}"
validate_certs: false
type: simple
zone: ansible
state: present
- name: Create a vlan zone
community.proxmox.proxmox_zone:
api_user: "root@pam"
api_password: "{{ vault.proxmox.root_password }}"
api_host: "{{ pc.proxmox.api_host }}"
validate_certs: false
type: vlan
zone: ansible
state: present
bridge: vmbr0
- name: Create a VXLAN zone with fabric
community.proxmox.proxmox_zone:
api_user: "root@pam"
api_password: "{{ vault.proxmox.root_password }}"
api_host: "{{ pc.proxmox.api_host }}"
validate_certs: false
type: vxlan
zone: myvxlan
fabric: my_fabric
state: present
- name: Create a VXLAN zone with peers
community.proxmox.proxmox_zone:
api_user: "root@pam"
api_password: "{{ vault.proxmox.root_password }}"
api_host: "{{ pc.proxmox.api_host }}"
validate_certs: false
type: vxlan
zone: myvxlan
peers: "192.168.0.1,192.168.0.2,192.168.0.3"
state: present
- name: Delete a zone
community.proxmox.proxmox_zone:
api_user: "root@pam"
api_password: "{{ vault.proxmox.root_password }}"
api_host: "{{ pc.proxmox.api_host }}"
validate_certs: false
type: simple
zone: ansible
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
zone string | Name of the zone which was created/updated/deleted Returned: on success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/proxmox/proxmox_zone_module.html