cisco.nd.nd_setup (0.5.0) — module

Manages setting up the Nexus Dashboard.

| "added in version" 0.5.0 of cisco.nd"

Authors: Shreyas Srish (@shrsr)

preview | supported by community

Install collection

Install with ansible-galaxy collection install cisco.nd:==0.5.0


Add to requirements.yml

  collections:
    - name: cisco.nd
      version: 0.5.0

Description

Manages setting up the Nexus Dashboard (ND).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Setup ND
  cisco.nd.nd_setup:
    cluster_name: cluster1
    ntp_config:
      servers:
        - ntp_host: 173.36.212.205
          ntp_key_id: 1
          preferred: true
      keys:
        - ntp_key_id: 1
          ntp_key: "1"
          authentication_type: "AES128CMAC"
          trusted: true
    dns_server:
      -  210.69.111.224
    dns_search_domain:
      - cisco.com
    app_network: 192.18.0.1/16
    service_network: 200.90.0.0/16
    nodes:
      - hostname: Test
        serial_number: 3C0A86H4D02E
        management_ip_address: 13.34.56.23
        username: rescue-user
        password: test
        management_network:
          ipv4_address: 13.34.56.23/24
          ipv4_gateway: 13.34.56.1
        data_network:
          ipv4_address: 12.34.56.22/24
          ipv4_gateway: 12.34.56.1
        bgp:
          asn: 2
          peers:
            - ip: 15.36.56.22/24
              asn: 2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Check the installation status of ND
  cisco.nd.nd_setup:
    state: query

Inputs

    
host:
    aliases:
    - hostname
    description:
    - IP Address or hostname of the Nexus Dashboard (ND) host.
    - If the value is not specified in the task, the value of environment variable C(ND_HOST)
      will be used instead.
    type: str

port:
    description:
    - Port number to be used for the REST connection.
    - The default value depends on parameter `use_ssl`.
    - If the value is not specified in the task, the value of environment variable C(ND_PORT)
      will be used instead.
    type: int

nodes:
    description:
    - The node details to set up Nexus Dashboard and bring up the User Interface.
    elements: dict
    suboptions:
      bgp:
        description:
        - This is used for enabling BGP.
        suboptions:
          asn:
            description:
            - The BGP ASN.
            required: true
            type: int
          peers:
            description:
            - The BGP peer details.
            elements: dict
            suboptions:
              asn:
                description:
                - The ASN of the BGP peer.
                required: true
                type: int
              ip:
                description:
                - The IPv4 Address of the BGP peer.
                required: true
                type: str
            type: list
        type: dict
      data_network:
        description:
        - The network used for clustering and communication between sites and applications.
        required: true
        suboptions:
          ipv4_address:
            aliases:
            - ip
            description:
            - The IPv4 address of the data network.
            required: true
            type: str
          ipv4_gateway:
            aliases:
            - gateway
            description:
            - The IPv4 gateway of the data network.
            required: true
            type: str
          ipv6_address:
            description:
            - The IPv6 address of the data network.
            type: str
          ipv6_gateway:
            description:
            - The IPv6 gateway of the data network.
            type: str
          vlan:
            description:
            - The VLAN of the data network.
            - Native VLAN or access port does not require VLAN.
            type: int
        type: dict
      hostname:
        description:
        - The host name of the node.
        required: true
        type: str
      management_ip_address:
        description:
        - The management IP address of the node.
        required: true
        type: str
      management_network:
        description:
        - The network used for DNS and NTP communication.
        required: true
        suboptions:
          ipv4_address:
            aliases:
            - ip
            description:
            - The IPv4 address of the management network.
            required: true
            type: str
          ipv4_gateway:
            aliases:
            - gateway
            description:
            - The IPv4 gateway of the management network.
            required: true
            type: str
          ipv6_address:
            description:
            - The IPv6 address of the management network.
            type: str
          ipv6_gateway:
            description:
            - The IPv6 gateway of the management network.
            type: str
        type: dict
      password:
        description:
        - The password of the node.
        required: true
        type: str
      serial_number:
        description:
        - The serial number of the node.
        required: true
        type: str
      username:
        description:
        - The username of the node.
        required: true
        type: str
    type: list

state:
    choices:
    - present
    - query
    default: present
    description:
    - Use C(present) for setting up Nexus Dashboard.
    - Use C(query) for checking the installation status of Nexus Dashboard.
    type: str

timeout:
    default: 30
    description:
    - The socket level timeout in seconds.
    - If the value is not specified in the task, the value of environment variable C(ND_TIMEOUT)
      will be used instead.
    type: int

use_ssl:
    description:
    - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
    - If the value is not specified in the task, the value of environment variable C(ND_USE_SSL)
      will be used instead.
    type: bool

password:
    description:
    - The password to use for authentication.
    - If the value is not specified in the task, the value of environment variables C(ND_PASSWORD)
      or C(ANSIBLE_NET_PASSWORD) will be used instead.
    type: str

username:
    description:
    - The username to use for authentication.
    - If the value is not specified in the task, the value of environment variables C(ND_USERNAME)
      or C(ANSIBLE_NET_USERNAME) will be used instead.
    type: str

use_proxy:
    description:
    - If C(no), it will not use a proxy, even if one is defined in an environment variable
      on the target hosts.
    - If the value is not specified in the task, the value of environment variable C(ND_USE_PROXY)
      will be used instead.
    type: bool

dns_server:
    aliases:
    - dns_servers
    description:
    - The IP address of the DNS server.
    elements: str
    type: list

ntp_config:
    description:
    - This is used for configuring NTP server and its other options.
    - This option is only applicable and required for ND version 3.0.1f and later.
    suboptions:
      keys:
        description:
        - This option is used for setting up the NTP keys.
        elements: dict
        suboptions:
          authentication_type:
            choices:
            - AES128CMAC
            - SHA1
            - MD5
            description:
            - The authentication type for the NTP key.
            required: true
            type: str
          ntp_key:
            description:
            - The value of the NTP key.
            required: true
            type: str
          ntp_key_id:
            description:
            - The NTP Key ID.
            required: true
            type: int
          trusted:
            default: false
            description:
            - The trusted status of the NTP key.
            type: bool
        type: list
      servers:
        description:
        - This option is used for setting up the NTP host.
        elements: dict
        required: true
        suboptions:
          ntp_host:
            description:
            - The IP address of the NTP server.
            required: true
            type: str
          ntp_key_id:
            description:
            - The NTP Key ID.
            type: int
          preferred:
            default: false
            description:
            - The preferred status of the NTP host.
            type: bool
        type: list
    type: dict

ntp_server:
    aliases:
    - ntp_servers
    description:
    - The IP address of the NTP server.
    - This option is only applicable and required for ND version 2.3.2d and later.
    elements: str
    type: list

app_network:
    description:
    - The app subnet.
    - This is a 'pod-to-pod' network and is used to run inter pod traffic.
    type: str

cluster_name:
    description:
    - The name of the ND cluster.
    type: str

ignore_proxy:
    description:
    - Proxy is ignored for the list of host addresses provided in this option.
    elements: str
    type: list

login_domain:
    description:
    - The login domain name to use for authentication.
    - The default value is DefaultAuth.
    - If the value is not specified in the task, the value of environment variable C(ND_LOGIN_DOMAIN)
      will be used instead.
    type: str

output_level:
    choices:
    - debug
    - info
    - normal
    default: normal
    description:
    - Influence the output of this ND module.
    - C(normal) means the standard output, incl. C(current) dict
    - C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts
    - C(debug) adds debugging output, incl. C(filter_string), C(method), C(response),
      C(status) and C(url) information
    - If the value is not specified in the task, the value of environment variable C(ND_OUTPUT_LEVEL)
      will be used instead.
    type: str

proxy_server:
    description:
    - The proxy server.
    type: str

proxy_password:
    description:
    - The password of the proxy server.
    type: str

proxy_username:
    description:
    - The username of the proxy server.
    type: str

validate_certs:
    description:
    - If C(no), SSL certificates will not be validated.
    - This should only set to C(no) when used on personally controlled sites using self-signed
      certificates.
    - If the value is not specified in the task, the value of environment variable C(ND_VALIDATE_CERTS)
      will be used instead.
    type: bool

service_network:
    description:
    - The service subnet.
    - This is a virtual level subnet used for communication within the cluster.
    type: str

app_network_ipv6:
    description:
    - The IPv6 app subnet.
    - This option is only applicable for ND version 3.0.1f and later.
    type: str

dns_search_domain:
    aliases:
    - dns_search_domains
    description:
    - The DNS search domains.
    elements: str
    type: list

service_network_ipv6:
    description:
    - The IPv6 service subnet.
    - This option is only applicable for ND version 3.0.1f and later.
    type: str