wwt.ansible_dnac.dnac_dns (1.1.6) — module

Add or Delete DNS Server(s)

| "added in version" 2.5 of wwt.ansible_dnac"

Authors: Jeff Andiorio (@jandiorio)

preview | supported by community

Install collection

Install with ansible-galaxy collection install wwt.ansible_dnac:==1.1.6


Add to requirements.yml

  collections:
    - name: wwt.ansible_dnac
      version: 1.1.6

Description

Add or delete DNS Server(s) in the Cisco DNA Center Design Workflow. \ The DNS Severs can be different values at different levels in the group hierarchy.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: create dns server
  dnac_dns:
    host: "{{ dnac.hostname }}"
    port: "{{ dnac.port }}"
    username: "{{ dnac.username }}"
    password: "{{ dnac.password }}"
    state: present
    primary_dns_server: 192.168.200.1
    secondary_dns_server: 192.168.200.2
    domain_name: dna.center.local
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: delete dns server
  dnac_dns:
    host: "{{ dnac.hostname }}"
    port: "{{ dnac.port }}"
    username: "{{ dnac.username }}"
    password: "{{ dnac.password }}"
    state: absent

Inputs

    
host:
    description:
    - Host is the target Cisco DNA Center controller to execute against.
    required: true

port:
    choices:
    - 80
    - 443
    default: 443
    description:
    - Port is the TCP port for the HTTP connection.
    required: false

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State provides the action to be executed using the terms present, absent, etc.
    required: false

timeout:
    default: 30
    description:
    - The timeout provides a value for how long to wait for the executed command complete.
    required: false

use_ssl:
    choices:
    - true
    - false
    default: true
    description:
    - Enter the boolean value for whether to use SSL or not.
    required: false

password:
    description:
    - Provide the password for connection to the Cisco DNA Center Controller.
    required: true

username:
    description:
    - Provide the username for the connection to the Cisco DNA Center Controller.
    required: true

use_proxy:
    choices:
    - true
    - false
    default: true
    description:
    - Enter a boolean value for whether to use proxy or not.
    required: false

group_name:
    default: Global
    description:
    - group_name is the name of the group in the hierarchy where you would like to apply
      these settings.
    required: false

domain_name:
    description:
    - DNS domain name of the environment within Cisco DNA Center
    required: true

validate_certs:
    choices:
    - true
    - false
    default: true
    description:
    - Specify if verifying the certificate is desired.
    required: false

primary_dns_server:
    description:
    - IP address of the primary DNS Server to manipulate.
    required: false

secondary_dns_server:
    description:
    - IP address of the secondary DNS Server to manipulate.
    required: false

Outputs

previous:
  description: Configuration from DNA Center prior to any changes.
  returned: success
  sample:
  - groupUuid: '-1'
    inheritedGroupName: ''
    inheritedGroupUuid: ''
    instanceType: dns
    instanceUuid: 799b3bc7-61fa-41b2-8fb3-db611af9db67
    key: dns.server
    namespace: global
    type: dns.setting
    value: []
    version: 52
  type: list
proprosed:
  description: Configuration to be sent to DNA Center.
  returned: success
  sample:
  - groupUuid: '-1'
    instanceType: dns
    key: dns.server
    namespace: global
    type: dns.setting
    value:
    - domainName: campus.wwtatc.local
      primaryIpAddress: 192.168.200.1
      secondaryIpAddress: 192.168.200.2
  type: list