intersight_network_connectivity_policy
Network Connectivity Policy configuration for Cisco Intersight
Collection: cisco.intersight
Full Name: cisco.intersight.intersight_network_connectivity_policy
Synopsis
Network Connectivity Policy 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 Network Connectivity Policy. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_. | |
| description | string | The user-defined description for the Network Connectivity Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). | ||
| tags | list | List of tags in Key: | ||
| enable_dynamic_dns | bool | false | If enabled, updates the resource records to the DNS from Cisco IMC. | |
| dynamic_dns_domain | string | The domain name appended to a hostname for a Dynamic DNS (DDNS) update. If left blank, only a hostname is sent to the DDNS update request. This parameter is optional even when enable_dynamic_dns is true. | ||
| enable_ipv4_dns_from_dhcp | bool | false | Enable IPv4 DNS from DHCP. If enabled, Cisco IMC retrieves the DNS server addresses from DHCP. | |
| preferred_ipv4_dns_server | string | 0.0.0.0 | IP address of the primary DNS server. This is used when enable_ipv4_dns_from_dhcp is false. | |
| alternate_ipv4_dns_server | string | 0.0.0.0 | IP address of the secondary DNS server. This is used when enable_ipv4_dns_from_dhcp is false. | |
| enable_ipv6 | bool | false | If enabled, allows to configure IPv6 properties. | |
| enable_ipv6_dns_from_dhcp | bool | false | If enabled, Cisco IMC retrieves the DNS server addresses from DHCP. Use DHCP field must be enabled for IPv6 in Cisco IMC to enable it. | |
| preferred_ipv6_dns_server | string | :: | IP address of the primary DNS server. | |
| alternate_ipv6_dns_server | string | :: | IP address of the secondary DNS server. |
Example
yaml
- cisco.intersight.intersight_network_connectivity_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Network connectivity policy with Dynamic DNS
dynamic_dns_domain: company.com
enable_dynamic_dns: true
enable_ipv4_dns_from_dhcp: true
enable_ipv6: true
enable_ipv6_dns_from_dhcp: true
name: DynamicDNS-Policy
organization: default
state: present
tags:
- Key: Site
Value: DataCenter-A
name: Create a Network Connectivity Policy with Dynamic DNS enabled
- cisco.intersight.intersight_network_connectivity_policy:
alternate_ipv4_dns_server: 8.8.4.4
alternate_ipv6_dns_server: 2001:4860:4860::8844
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Network connectivity policy with static DNS servers
enable_dynamic_dns: false
enable_ipv4_dns_from_dhcp: false
enable_ipv6: true
enable_ipv6_dns_from_dhcp: false
name: StaticDNS-Policy
preferred_ipv4_dns_server: 8.8.8.8
preferred_ipv6_dns_server: 2001:4860:4860::8888
state: present
name: Create a Network Connectivity Policy with static DNS servers
- cisco.intersight.intersight_network_connectivity_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: A basic network connectivity policy
name: Basic-Network-Policy
state: present
name: Create a basic Network Connectivity Policy with defaults
- cisco.intersight.intersight_network_connectivity_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: DynamicDNS-Policy
state: absent
name: Delete a Network Connectivity Policy