community.vmware.vmware_host_tcpip_stacks – Manage the TCP/IP Stacks configuration of ESXi host

Note

This plugin is part of the community.vmware collection (version 1.13.0).

To install it use: ansible-galaxy collection install community.vmware.

To use it in a playbook, specify: community.vmware.vmware_host_tcpip_stacks.

New in version 1.10.0: of community.vmware

Synopsis

  • This module can be used to modify the TCP/IP stacks configuration.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.7

  • PyVmomi

Parameters

Parameter Choices/Defaults Comments
default
dictionary
The TCP/IP stacks configuration of the default.
alternate_dns
string
The IP address of the alternate dns server.
congestion_algorithm
string
    Choices:
  • newreno ←
  • cubic
The TCP congest control algorithm.
domain
string / required
The domain name portion of the DNS name.
gateway
string
The ipv4 gateway address.
hostname
string / required
The host name of the ESXi host.
ipv6_gateway
string
added in 1.11.0 of community.vmware
The ipv6 gateway address.
max_num_connections
integer
Default:
11000
The maximum number of socket connection that are requested.
preferred_dns
string
The IP address of the preferred dns server.
search_domains
list / elements=string
Default:
[]
The domain in which to search for hosts, placed in order of preference.
esxi_hostname
string / required
Name of the ESXi host.
hostname
string
The hostname or IP address of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
Environment variable support added in Ansible 2.6.
password
string
The password of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
Environment variable support added in Ansible 2.6.

aliases: pass, pwd
port
integer
Default:
443
The port number of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
Environment variable support added in Ansible 2.6.
provisioning
dictionary
The TCP/IP stacks configuration of the provisioning.
congestion_algorithm
string
    Choices:
  • newreno ←
  • cubic
The TCP congest control algorithm.
gateway
string
The ipv4 gateway address.
ipv6_gateway
string
added in 1.11.0 of community.vmware
The ipv6 gateway address.
max_num_connections
integer
Default:
11000
The maximum number of socket connection that are requested.
proxy_host
string
Address of a proxy that will receive all HTTPS requests and relay them.
The format is a hostname or a IP.
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
proxy_port
integer
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
username
string
The username of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
Environment variable support added in Ansible 2.6.

aliases: admin, user
validate_certs
boolean
    Choices:
  • no
  • yes ←
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.
Environment variable support added in Ansible 2.6.
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
vmotion
dictionary
The TCP/IP stacks configuration of the vmotion.
congestion_algorithm
string
    Choices:
  • newreno ←
  • cubic
The TCP congest control algorithm.
gateway
string
The ipv4 gateway address.
ipv6_gateway
string
added in 1.11.0 of community.vmware
The ipv6 gateway address.
max_num_connections
integer
Default:
11000
The maximum number of socket connection that are requested.
vxlan
dictionary
The TCP/IP stacks configuration of the vxlan.

aliases: nsx_overlay
congestion_algorithm
string
    Choices:
  • newreno ←
  • cubic
The TCP congest control algorithm.
gateway
string
The ipv4 gateway address.
ipv6_gateway
string
added in 1.11.0 of community.vmware
The ipv6 gateway address.
max_num_connections
integer
Default:
11000
The maximum number of socket connection that are requested.

Examples

- name: Update the TCP/IP stack configuration of the default
  community.vmware.vmware_host_tcpip_stacks:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: false
    esxi_hostname: "{{ esxi_hostname }}"
    default:
      hostname: "{{ esxi_hostname }}"
      domain: example.com
      preferred_dns: 192.168.10.1
      alternate_dns: 192.168.20.1
      search_domains:
        - hoge.com
        - fuga.com
      gateway: 192.168.10.1
      congestion_algorithm: cubic
      max_num_connections: 12000

- name: Update the TCP/IP stack configuration of the provisioning
  community.vmware.vmware_host_tcpip_stacks:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: false
    esxi_hostname: "{{ esxi_hostname }}"
    provisioning:
      congestion_algorithm: newreno
      max_num_connections: 12000
      gateway: 10.10.10.254

- name: Update the TCP/IP stack configuration of the default and provisioning
  community.vmware.vmware_host_tcpip_stacks:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: false
    esxi_hostname: "{{ esxi_hostname }}"
    default:
      hostname: "{{ esxi_hostname }}"
      domain: example.com
      preferred_dns: 192.168.10.1
      alternate_dns: 192.168.20.1
      search_domains:
        - hoge.com
        - fuga.com
      gateway: 192.168.10.1
      congestion_algorithm: cubic
      max_num_connections: 12000
    provisioning:
      congestion_algorithm: newreno
      max_num_connections: 12000
      gateway: 10.10.10.254

- name: Update the ipv6 gateway of the provisioning TCP/IP stack
  community.vmware.vmware_host_tcpip_stacks:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: false
    esxi_hostname: "{{ esxi_hostname }}"
    provisioning:
      ipv6_gateway: ::ffff:6440:301

Return Values

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

Key Returned Description
default
dictionary
always
dict of the TCP/IP stack configuration of the default.

Sample:
{ "alternate_dns": "192.168.20.1", "congestion_algorithm": "cubic", "domain": "example.com", "gateway": "192.168.10.1", "ipv6_gateway", null, "hostname": "esxi-test03", "max_num_connections": 12000, "preferred_dns": "192.168.10.1", "search_domains": [ "hoge.com", "fuga.com" ] }
provisioning
dictionary
always
dict of the TCP/IP stack configuration of the provisioning.

Sample:
{ "congestion_algorithm": "newreno", "gateway": "10.10.10.254", "ipv6_gateway": null, "max_num_connections": 12000 }
vmotion
dictionary
always
dict of the TCP/IP stack configuration of the vmotion.

Sample:
{ "congestion_algorithm": "newreno", "gateway": null, "ipv6_gateway": null, "max_num_connections": 11000 }
vxlan
dictionary
always
dict of the TCP/IP stack configuration of the vxlan.

Sample:
{ "congestion_algorithm": "newreno", "gateway": null, "ipv6_gateway": null, "max_num_connections": 11000 }


Authors

  • sky-joker (@sky-joker)