nsxt_policy_ip_pool – Create or Delete a Policy IP Pool

New in version 2.8.

Synopsis

  • Creates or deletes a Policy IP Pool. Required attributes include id and display_name.

Parameters

Parameter Choices/Defaults Comments
achieve_subresource_state_if_del_parent
boolean
    Choices:
  • no ←
  • yes
Can be used to achieve the state of subresources even if the parent(base) resource's state is absent.
Can be specified for each subresource.
ca_path
string
Path to the CA bundle to be used to verify host's SSL certificate
create_or_update_subresource_first
boolean
    Choices:
  • no ←
  • yes
Can be used to create subresources first.
Can be specified for each subresource.
delete_subresource_first
boolean
    Choices:
  • no
  • yes ←
Can be used to delete subresources first.
Can be specified for each subresource.
description
string
Resource description.
display_name
string
Display name.
If resource ID is not specified, display_name will be used as ID.
do_wait_till_create
boolean
    Choices:
  • no ←
  • yes
Can be used to wait for the realization of subresource before the request to create the next resource is sent to the Manager.
Can be specified for each subresource.
hostname
string / required
Deployed NSX manager hostname.
id
string
The id of the Policy IP Pool.
nsx_cert_path
string
Path to the certificate created for the Principal Identity using which the CRUD operations should be performed
nsx_key_path
string
Path to the certificate key created for the Principal Identity using which the CRUD operations should be performed
Must be specified if nsx_cert_path is specified
password
string
The password to authenticate with the NSX manager.
Must be specified if username is specified
pool_block_subnets
list
Specify the IP Pool Block Subnets that need to be created, updated, or deleted as a list of dict in this section
auto_assign_gateway
boolean
    Choices:
  • no
  • yes ←
Indicate whether default gateway is to be reserved from the range
If this property is set to true, the first IP in the range will be reserved for gateway.
description
string
Resource description.
display_name
string
Display name.
If resource ID is not specified, display_name will be used as ID.
do_wait_till_create
boolean
    Choices:
  • no ←
  • yes
Can be used to wait for the realization of subresource before the request to create the next resource is sent to the Manager
id
string
The id of the Policy IP Pool Block Subnet.
ip_block_display_name
string
Same as ip_block_id. Either one must be specified. If both are specified, ip_block_id takes precedence.
ip_block_id
string
The ID of the IpAddressBlock from which the subnet is to be created
size
integer
Represents the size or number of IP addresses in the subnet
The size parameter is required for subnet creation. It must be specified during creation but cannot be changed later.
state
- / required
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
tags
dictionary
Opaque identifiers meaningful to the API user.
scope
string / required
Tag scope.
tag
string / required
Tag value.
pool_static_subnets
list
Specify the IP Pool Static Subnets that need to be created, updated, or deleted as a list of dict in this section
allocation_ranges
list
A collection of IPv4 or IPv6 IP Pool Ranges.
end
string / required
The end IP Address of the IP Range.
start
string / required
The start IP Address of the IP Range.
cidr
string / required
Subnet representation is a network address and prefix length
description
string
Resource description.
display_name
string
Display name.
If resource ID is not specified, display_name will be used as ID.
dns_nameservers
list
The collection of upto 3 DNS servers for the subnet.
dns_suffix
string
The DNS suffix for the DNS server.
do_wait_till_create
boolean
    Choices:
  • no ←
  • yes
Can be used to wait for the realization of subresource before the request to create the next resource is sent to the Manager
gateway_ip
string
The default gateway address on a layer-3 router.
id
string
The id of the Policy IP Pool Block Subnet.
state
-
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
tags
dictionary
Opaque identifiers meaningful to the API user.
scope
string / required
Tag scope.
tag
string / required
Tag value.
request_headers
dictionary
HTTP request headers to be sent to the host while making any request
state
- / required
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
tags
dictionary
Opaque identifiers meaningful to the API user.
scope
string / required
Tag scope.
tag
string / required
Tag value.
username
string
The username to authenticate with the NSX manager.
validate_certs
boolean
    Choices:
  • no ←
  • yes
Enable server certificate verification.

Examples

- name: create IP Pool
  nsxt_policy_ip_pool:
    hostname: "10.10.10.10"
    nsx_cert_path: /root/com.vmware.nsx.ncp/nsx.crt
    nsx_key_path: /root/com.vmware.nsx.ncp/nsx.key
    validate_certs: False
    id: test-ip-pool
    display_name: test-ip-pool
    state: "absent"
    tags:
    - tag: "a"
      scope: "b"
    pool_block_subnets:
      - id: test-ip-subnet-1
        state: present
        ip_block_id: "test-ip-blk-1"
        size: 16
      - display_name: test-ip-subnet-2
        state: present
        ip_block_id: "test-ip-blk-1"
        size: 16
      - display_name: test-ip-subnet-3
        state: present
        ip_block_id: "test-ip-blk-1"
        size: 8
    pool_static_subnets:
      - id: test-ip-static-subnet-1
        state: present
        allocation_ranges:
          - start: '192.116.0.10'
            end: '192.116.0.20'
          - start: '192.116.0.30'
            end: '192.116.0.40'
        cidr: '192.116.0.0/26'
      - display_name: test-ip-static-subnet-2
        state: present
        allocation_ranges:
          - start: '192.116.1.10'
            end: '192.116.1.20'
          - start: '192.116.1.30'
            end: '192.116.1.40'
        cidr: '192.116.1.0/26'

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by the Ansible Community. [community]

Authors

  • Gautam Verma