community.proxmox.proxmox_zone module – Manage Proxmox zone configurations.

Note

This module is part of the community.proxmox collection (version 1.4.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:

  • false

  • true

api_host

string / required

Specify the target host of the Proxmox VE cluster.

Uses the PROXMOX_HOST environment variable if not specified.

api_password

string

Specify the password to authenticate with.

Uses the PROXMOX_PASSWORD environment variable if not specified.

api_port

integer

Specify the target port of the Proxmox VE cluster.

Uses the PROXMOX_PORT environment variable if not specified.

api_token_id

string

Specify the token ID.

Uses the PROXMOX_TOKEN_ID environment variable if not specified.

api_token_secret

string

Specify the token secret.

Uses the PROXMOX_TOKEN_SECRET environment variable if not specified.

api_user

string / required

Specify the user to authenticate with.

Uses the PROXMOX_USER environment variable if not specified.

bridge

string

Specify the bridge interface to use.

bridge_disable_mac_learning

boolean

Disable auto MAC address learning on the bridge interface.

Choices:

  • false

  • true

controller

string

FRR router name.

dhcp

string

Type of the DHCP backend for this zone.

Choices:

  • "dnsmasq"

disable_arp_nd_suppression

boolean

Disable IPv4 ARP and IPv6 neighbour discovery suppression.

Choices:

  • false

  • true

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:

  • false

  • true

exitnodes_primary

string

Force traffic to this exit node first.

fabric

string

SDN fabric to use as underlay for this VXLAN zone.

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

Peers address list.

reversedns

string

Reverse DNS API server.

rt_import

string

Route-Target import.

state

string

The desired state of the zone configuration.

Choices:

  • "present" ← (default)

  • "absent"

tag

integer

Service-VLAN tag.

type

string

Specify the type of zone.

Choices:

  • "evpn"

  • "faucet"

  • "qinq"

  • "simple"

  • "vlan"

  • "vxlan"

update

boolean

If state=present and zone exists it’ll update.

Choices:

  • false

  • true ← (default)

validate_certs

boolean

If false, SSL certificates will not be validated.

This should only be used on personally controlled sites using self-signed certificates.

Uses the PROXMOX_VALIDATE_CERTS environment variable if not specified.

Choices:

  • false ← (default)

  • true

vlan_protocol

string

Specify the VLAN protocol to use.

Choices:

  • "802.1q"

  • "802.1ad"

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 group/community.proxmox.proxmox in module_defaults to set defaults for this module.

check_mode

Support: none

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

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: 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: "test"

Authors

  • Jana Hoch