intersight_ip_pool
IP Pool configuration for Cisco Intersight
Collection: cisco.intersight
Full Name: cisco.intersight.intersight_ip_pool
Synopsis
IP Pool configuration for Cisco Intersight
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_private_key | string | 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—– | ||
| api_uri | string | https://intersight.com/api/v1 | URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. | |
| api_key_id | string | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. Required if I(api_bearer_token) is not provided. | ||
| api_bearer_token | string | Bearer token for OAuth2 authentication with the Intersight API. When provided, I(api_key_id) and I(api_private_key) are not required and the C(cryptography) Python library is not needed. If not set, the value of the INTERSIGHT_API_BEARER_TOKEN environment variable is used. Secret value; omitted from logs and results. | ||
| validate_certs | bool | true | Boolean control for verifying the api_uri TLS certificate | |
| use_proxy | bool | true | If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. | |
| state | string | present | If C(present), will verify the resource is present and will create if needed. If C(absent), will verify the resource is absent and will delete if needed. Choices: present, absent | |
| organization | string | default | 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. | |
| name | string | yes | The name assigned to the IP Pool. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_. | |
| description | string | 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(_). | ||
| tags | list | List of tags in Key: | ||
| assignment_order | string | default | Assignment order decides the order in which the next identifier is allocated. If C(sequential), identifiers are assigned in a sequential order. If C(default), the system determines the assignment order. Choices: default, sequential | |
| enable_block_level_subnet_config | bool | false | 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. | |
| ipv4_config | dict | 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. | ||
| ipv4_blocks | list | List of the IPv4 blocks. Should include the ipv4_config details per block in case “enable_block_level_subnet_config” is true | ||
| ipv6_config | dict | 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. | ||
| ipv6_blocks | list | Define the IPv6 blocks. Should include the ipv6_config details per block in case “enable_block_level_subnet_config” is true |
Example
yaml
- cisco.intersight.intersight_ip_pool:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assignment_order: sequential
description: IP Pool for lab use
ipv4_blocks:
- from: 172.17.116.32
size: 16
- from: 172.17.116.64
size: 16
ipv4_config:
gateway: 172.17.116.1
netmask: 255.255.255.0
primary_dns: 172.17.116.2
secondary_dns: 172.17.116.3
ipv6_blocks:
- from: 2001:db8::2
size: 64
- from: 2001:db8::42
size: 64
ipv6_config:
gateway: 2001:db8::1
prefix: 64
primary_dns: 2001:4860:4860::8888
secondary_dns: 2001:4860:4860::8844
name: lab-ip-pool
organization: DevNet
tags:
- Key: Site
Value: RCDN
name: Configure IP Pool with global config
- cisco.intersight.intersight_ip_pool:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: IP Pool for lab use
enable_block_level_subnet_config: true
ipv4_blocks:
- from: 172.17.116.32
ipv4_config:
gateway: 172.17.116.1
netmask: 255.255.255.0
primary_dns: 172.17.116.2
secondary_dns: 172.17.116.3
size: 16
- from: 172.17.117.32
ipv4_config:
gateway: 172.17.117.1
netmask: 255.255.255.0
primary_dns: 172.17.117.2
secondary_dns: 172.17.117.3
size: 16
ipv6_blocks:
- from: 2001:db8::2
ipv6_config:
gateway: 2001:db8::1
prefix: 64
primary_dns: 2001:4860:4860::8888
secondary_dns: 2001:4860:4860::8844
size: 64
- from: fd12:3456:789a::1
ipv6_config:
gateway: fd12:3456:789a::1
prefix: 64
primary_dns: 2606:4700:4700::1111
secondary_dns: 2606:4700:4700::1001
size: 64
name: lab-ip-pool
organization: DevNet
tags:
- Key: Site
Value: RCDN
name: Configure IP Pool with block level config
- cisco.intersight.intersight_ip_pool:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: lab-ip-pool
organization: DevNet
state: absent
name: Delete IP Pool