PARALLAX

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

NameTypeRequiredDefaultDescription
api_private_keystringFilename (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—– —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. Required if I(api_bearer_token) is not provided. Secret value; omitted from logs and results.
api_uristringhttps://intersight.com/api/v1URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used.
api_key_idstringPublic 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_tokenstringBearer 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_certsbooltrueBoolean control for verifying the api_uri TLS certificate
use_proxybooltrueIf C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
statestringpresentIf 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
organizationstringdefaultThe 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.
namestringyesThe name assigned to the Network Connectivity Policy. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_.
descriptionstringThe 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(_).
tagslistList of tags in Key: Value: format.
enable_dynamic_dnsboolfalseIf enabled, updates the resource records to the DNS from Cisco IMC.
dynamic_dns_domainstringThe 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_dhcpboolfalseEnable IPv4 DNS from DHCP. If enabled, Cisco IMC retrieves the DNS server addresses from DHCP.
preferred_ipv4_dns_serverstring0.0.0.0IP address of the primary DNS server. This is used when enable_ipv4_dns_from_dhcp is false.
alternate_ipv4_dns_serverstring0.0.0.0IP address of the secondary DNS server. This is used when enable_ipv4_dns_from_dhcp is false.
enable_ipv6boolfalseIf enabled, allows to configure IPv6 properties.
enable_ipv6_dns_from_dhcpboolfalseIf 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_serverstring::IP address of the primary DNS server.
alternate_ipv6_dns_serverstring::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
Search
    ↑ ↓ move↵ openesc close