vmware.vmware_rest.appliance_networking_interfaces_ipv6 module – Manage the IPv6 configuration of a vCenter Server Appliance network interface.

Note

This module is part of the vmware.vmware_rest collection (version 5.0.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 vmware.vmware_rest.

To use it in a playbook, specify: vmware.vmware_rest.appliance_networking_interfaces_ipv6.

New in vmware.vmware_rest 5.0.0

Synopsis

  • Configure the IPv6 settings of a specific network interface on the vCenter Server Appliance.

  • Addresses can be assigned automatically by a DHCP server, by Stateless Address Autoconfiguration (SLAAC), or set statically, and an optional default gateway can be configured.

  • Use vmware.vmware_rest.appliance_networking_interfaces_ipv6_info to view the current IPv6 configuration.

Parameters

Parameter

Comments

addresses

list / elements=dictionary

The list of IPv6 addresses to assign statically to the interface.

This property was added in vSphere API 6.7.

address

string / required

The IPv6 address, for example fc00:10:20:83:20c:29ff:fe94:bb5a.

This property was added in vSphere API 6.7.

prefix

integer / required

The IPv6 CIDR prefix length, for example 64.

This property was added in vSphere API 6.7.

autoconf

boolean

Whether the interface obtains an IPv6 address through Stateless Address Autoconfiguration (SLAAC).

This property was added in vSphere API 6.7.

Choices:

  • false

  • true

default_gateway

string

The IPv6 address of the default gateway for static address assignment.

This sets the global IPv6 default gateway using the specified gateway address and interface, replacing any existing default gateway. A link-local gateway address is added only for this interface. Configuring multiple global default gateways through different interfaces is not supported.

This property was added in vSphere API 6.7.

dhcp

boolean

Whether the interface obtains an IPv6 address automatically from a DHCP server.

This property was added in vSphere API 6.7.

Choices:

  • false

  • true

interface_name

string / required

The name of the network interface to configure, for example nic0.

The value is the identifier of an interface returned by vmware.vmware_rest.appliance_networking_interfaces_info.

session_timeout

float

Timeout in seconds for the whole operation including connection establishment, request sending, and response.

Default: 300.0

state

string

The desired state of the interface IPv6 configuration.

Use present to apply the given IPv6 settings.

Choices:

  • "present" ← (default)

vcenter_hostname

string / required

The hostname or IP address of the vSphere vCenter.

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

vcenter_password

string / required

The vSphere vCenter password.

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

vcenter_port

integer

The port number of the vSphere vCenter.

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

vcenter_rest_log_file

string

Optional path to a log file for HTTP REST interaction.

If the value is not specified in the task, the value of environment variable VMWARE_REST_LOG_FILE will be used instead.

vcenter_username

string / required

The vSphere vCenter username.

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

vcenter_validate_certs

boolean

Allows connection when SSL certificates are not valid.

Set to false when certificates are not trusted.

If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.

Choices:

  • false

  • true ← (default)

Notes

Note

  • Generated from vSphere API spec 9.1.0.

  • Compatible with vSphere API 7.0.3.

  • Compatible with vSphere API 8.0.2.

Examples

- name: Configure nic0 to obtain an IPv6 address via DHCP
  vmware.vmware_rest.appliance_networking_interfaces_ipv6:
    interface_name: nic0
    dhcp: true
    autoconf: false
    addresses: []
    default_gateway: ""
    state: present

- name: Enable SLAAC autoconfiguration on nic0
  vmware.vmware_rest.appliance_networking_interfaces_ipv6:
    interface_name: nic0
    dhcp: false
    autoconf: true
    addresses: []
    default_gateway: ""
    state: present

- name: Assign a static IPv6 address to nic0
  vmware.vmware_rest.appliance_networking_interfaces_ipv6:
    interface_name: nic0
    dhcp: false
    autoconf: false
    addresses:
      - address: fc00:10:20:83:20c:29ff:fe94:bb5a
        prefix: 64
    default_gateway: fc00:10:20:83::1
    state: present

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

value

any

The raw API response body from the vCenter operation. Empty when the operation returns no content.

Returned: On success

Sample: {}

Authors

  • Ansible Eco Content Team (@eco-ansible-content)