cisco.nd.nd_site (0.5.0) — module

Manage sites on Nexus Dashboard.

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

Authors: Anvitha Jain (@anvitha-jain)

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

Manage sites on Nexus Dashboard which are then used by Nexus Dashboard Orchestrator (NDO) >= 2.2(2d).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add a new site
  cisco.nd.nd_site:
    url: SiteURL
    site_username: SiteUsername
    site_password: SitePassword
    site_type: aci
    location:
      latitude: 50.887318
      longitude: 4.447084
    login_domain: "DefaultAuth"
    inband_epg: In-Band-EPG
    state: present
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a site
  cisco.nd.nd_site:
    site_name: north_europe
    state: absent
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query a site
  cisco.nd.nd_site:
    site_name: north_europe
    state: query
  delegate_to: localhost
  register: query_result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query all sites
  cisco.nd.nd_site:
    state: query
  delegate_to: localhost
  register: query_result

Inputs

    
url:
    aliases:
    - host_name
    - ip_address
    - site_url
    description:
    - The URL to reference the APICs.
    type: str

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

state:
    choices:
    - absent
    - present
    - query
    default: present
    description:
    - Use C(present) or C(absent) for adding or removing.
    - Use C(query) for listing an object or multiple objects.
    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

latitude:
    description:
    - The latitude of the location of the site.
    type: float

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

longitude:
    description:
    - The longitude of the location of the site.
    type: float

site_name:
    aliases:
    - name
    - fabric_name
    description:
    - The name of the site.
    type: str

site_type:
    choices:
    - aci
    - dcnm
    - third_party
    - cloud_aci
    - dcnm_ng
    - ndfc
    description:
    - The site type of the APICs.
    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

inband_epg:
    description:
    - The In-Band Endpoint Group (EPG) used to connect Nexus Dashboard to the fabric.
    type: str

re_register:
    default: false
    description:
    - To modify the APIC parameters (site_username, site_password and login_domain).
    - Using this option deletes the existing site and re-creates it.
    type: bool

login_domain:
    description:
    - The AAA login domain for the username of the APIC.
    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

site_password:
    description:
    - The password for the APIC.
    type: str

site_username:
    description:
    - The username for the APIC.
    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