cisco.intersight.intersight_ip_pool module – IP Pool configuration for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.2.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 cisco.intersight
.
To use it in a playbook, specify: cisco.intersight.intersight_ip_pool
.
Synopsis
IP Pool configuration for Cisco Intersight.
Used to configure IP pools settings on Cisco Intersight managed devices.
For more information see Cisco Intersight.
Parameters
Parameter |
Comments |
---|---|
Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. |
|
Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt_string –vault-id tme@/Users/dsoper/Documents/vault_password_file ‘—–BEGIN EC PRIVATE KEY—– <your private key data> —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. |
|
URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
|
The user-defined description of the IP Pool. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Determines if the “Netmask”, “Gateway”, “PrimaryDns” and “SecondaryDns” is globally defined or specified per IPv4 block. Determines if the “Prefix”, “Gateway”, “PrimaryDns” and “SecondaryDns” is globally defined or specified per IPv6 block. Choices:
|
|
List of the IPv4 blocks. Should include the ipv4_config details per block in case “enable_block_level_subnet_config” is true |
|
First IPv4 address of the block. |
|
Block definition of IPv4 “Netmask”, “Gateway”, “PrimaryDns” and “SecondaryDns”. Used only when “enable_block_level_subnet_config” is true, otherwise should be defined globally. |
|
The Gateway IP used for the current IPv4 block. |
|
The Netmask used for the current IPv4 block. |
|
The PrimaryDns IP used for the current IPv4 block. |
|
The SecondaryDns IP used for the current IPv4 block. |
|
Number of identifiers this block can hold. |
|
Global definition of IPv4 “Netmask”, “Gateway”, “PrimaryDns” and “SecondaryDns”. Used only when “enable_block_level_subnet_config” is false, otherwise should be defined inside ipv4_blocks. |
|
IP address of the default IPv4 gateway. Gateway IP used for all IPv4 blocks. |
|
A subnet mask is a 32-bit number that masks an IP address and divides the IP address into network address and host address. Netmask used for all IPv4 blocks. |
|
IP Address of the primary Domain Name System (DNS) server. PrimaryDns IP used for all IPv4 blocks. |
|
IP Address of the secondary Domain Name System (DNS) server. SecondaryDns IP used for all IPv4 blocks. |
|
Define the IPv6 blocks. Should include the ipv6_config details per block in case “enable_block_level_subnet_config” is true |
|
The initial IP address for the IPv6 block. |
|
Block definition of IPv6 “Prefix”, “Gateway”, “PrimaryDns” and “SecondaryDns”. Used only when “enable_block_level_subnet_config” is true, otherwise should be defined globally. |
|
The Gateway IP used for the current IPv6 block. |
|
The Prefix used for the current IPv6 block. |
|
The PrimaryDns IP used for the current IPv6 block. |
|
The SecondaryDns IP used for the current IPv6 block. |
|
The number of IPs in the block. |
|
Global definition of IPv6 “Prefix”, “Gateway”, “PrimaryDns” and “SecondaryDns”. Used only when “enable_block_level_subnet_config” is false, otherwise should be defined inside ipv6_blocks. |
|
IP address of the default IPv6 gateway. Gateway IP used for all IPv6 blocks. |
|
A prefix length which masks the IP address and divides the IP address into network address and host address. Prefix used for all IPv6 blocks. |
|
IP Address of the primary Domain Name System (DNS) server. PrimaryDns IP used for all IPv6 blocks. |
|
IP Address of the secondary Domain Name System (DNS) server. SecondaryDns IP used for all IPv6 blocks. |
|
The name assigned to the IP Pool. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
The name of the Organization this resource is assigned to. Profiles, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization. Default: |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Configure IP Pool with global config
cisco.intersight.intersight_ip_pool:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: DevNet
name: lab-ip-pool
description: IP Pool for lab use
ipv4_config:
netmask: "255.255.255.0"
gateway: "172.17.116.1"
primary_dns: "172.17.116.2"
secondary_dns: "172.17.116.3"
ipv4_blocks:
- from: "172.17.116.32"
size: 16
- from: "172.17.116.64"
size: 16
ipv6_config:
prefix: 64
gateway: "2001:db8::1"
primary_dns: "2001:4860:4860::8888"
secondary_dns: "2001:4860:4860::8844"
ipv6_blocks:
- from: "2001:db8::2"
size: 64
- from: "2001:db8::42"
size: 64
tags:
- Key: Site
Value: RCDN
- name: Configure IP Pool with block level config
cisco.intersight.intersight_ip_pool:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: DevNet
name: lab-ip-pool
description: IP Pool for lab use
enable_block_level_subnet_config: true
ipv4_blocks:
- from: "172.17.116.32"
size: 16
ipv4_config:
netmask: "255.255.255.0"
gateway: "172.17.116.1"
primary_dns: "172.17.116.2"
secondary_dns: "172.17.116.3"
- from: "172.17.117.32"
size: 16
ipv4_config:
netmask: "255.255.255.0"
gateway: "172.17.117.1"
primary_dns: "172.17.117.2"
secondary_dns: "172.17.117.3"
ipv6_blocks:
- from: "2001:db8::2"
size: 64
ipv6_config:
prefix: 64
gateway: "2001:db8::1"
primary_dns: "2001:4860:4860::8888"
secondary_dns: "2001:4860:4860::8844"
- from: "fd12:3456:789a::1"
size: 64
ipv6_config:
prefix: 64
gateway: "fd12:3456:789a::1"
primary_dns: "2606:4700:4700::1111"
secondary_dns: "2606:4700:4700::1001"
tags:
- Key: Site
Value: RCDN
- name: Delete IP Pool
cisco.intersight.intersight_ip_pool:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: DevNet
name: lab-ip-pool
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The API response output returned by the specified resource. Returned: always Sample: |