cisco.dnac.network_devices_create module -- Resource module for Network Devices Create

Note

This module is part of the cisco.dnac collection (version 6.46.0).

To install it, use: ansible-galaxy collection install cisco.dnac. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.dnac.network_devices_create.

New in cisco.dnac 6.46.0

Synopsis

  • Manage operation create of the resource Network Devices Create. - > Adds the network device to inventory. The API supports Network Device, Meraki Dashboard, Compute Device, Firewall Management Center FMC and Third-Party Device. Access points associated with added WLC will be automatically added to inventory. For Meraki Dashboard, use the dashboard URL as the management address.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • dnacentersdk >= 2.11.0

  • python >= 3.12

Parameters

Parameter

Comments

category

string

Category of the device. Used to determine the type of the device being added.

credentials

dictionary

Network Devices Create's credentials.

cli

dictionary

Network Devices Create's cli.

enablePassword

string

Password that is used to move to a higher privilege level in the CLI. Configure this password only if your network devices require it. Passwords cannot contain spaces or angle brackets(<>).

password

string

CLI Password. Passwords cannot contain spaces or angle brackets(<>).

protocol

string

Protocol used for CLI access. Default is SSH.

username

string

CLI username to login to the device.

http

dictionary

Network Devices Create's http.

password

string

HTTP password. The password cannot contain spaces or angle brackets (< >). Note that some Cisco IOS XE devices do not allow a question mark (?).

port

integer

HTTP port. The default port is 443 for protocol= HTTPS and 80 for protocol=HTTP.

protocol

string

HTTP protocol. Compute device require HTTPS.

username

string

HTTP username. Username cannot contain spaces or angle brackets (< >).

meraki

dictionary

Network Devices Create's meraki.

apiKey

string

Meraki API key.

orgIds

list / elements=string

Meraki organizations for which the devices needs to be imported. Imports devices from all organizations if not provided.

netconf

dictionary

Network Devices Create's netconf.

port

integer

Netconf port of the device. Default port is 830.

snmp

dictionary

Network Devices Create's snmp.

authPassword

string

SNMPv3 authentication password.

authType

string

SNMPv3 authentication type. Required for AUTHPRIV (Authentication and Privacy) and AUTHNOPRIV (Authentication) modes. SHA256 The device will be authenticated using SHA256. SHA The device will be authenticated using SHA. MD5 The device will be authenticated using MD5.

mode

string

Security level that an SNMP message requires. AUTHPRIV provides both authentication and encryption. AUTHNOPRIV provides authentication, but does not provide encryption. NOAUTHNOPRIV does not provide authentication or encryption.

privacyPassword

string

SNMPv3 privacy password.

privacyType

string

SNMP privacy type. Required if the SNMP mode is AUTHPRIV. AES128 algorithm used for encryption. AES192 algorithm used for encryption. AES256 algorithm used for encryption. CISCOAES192 algorithm used for encryption. CISCOAES256 algorithm used for encryption.

readCommunity

string

Read-only community string password used only to view SNMP information on the device.

username

string

Name associated with the SNMPv3 settings.

version

string

SNMP version to be used for the device.

writeCommunity

string

Write community string used to make changes to the SNMP information on the device.

dnac_debug

boolean

Flag for Cisco DNA Center SDK to enable debugging.

Choices:

dnac_host

string / required

The Cisco DNA Center hostname.

dnac_password

string

The Cisco DNA Center password to authenticate.

dnac_port

integer

The Cisco DNA Center port.

Default: :ansible-option-default:`443`

dnac_username

aliases: user

string

The Cisco DNA Center username to authenticate.

Default: :ansible-option-default:`"admin"`

dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

dnac_version

string

Informs the SDK which version of Cisco DNA Center to use.

Default: :ansible-option-default:`"3.1.6.0"`

managementAddress

string

Management address of the network device. For meraki dashboard, this is the dashboard URL.

validate_response_schema

boolean

Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

Notes

Note

  • SDK Method used are devices.Devices.adds_a_new_network_device,

  • Paths used are post /dna/intent/api/v1/networkDevices,

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK

  • The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection

See Also

See also

Cisco DNA Center documentation for Devices AddsANewNetworkDevice

Complete reference of the AddsANewNetworkDevice API.

Examples

---
- name: Create
  cisco.dnac.network_devices_create:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    category: string
    credentials:
      cli:
        enablePassword: string
        password: string
        protocol: string
        username: string
      http:
        password: string
        port: 0
        protocol: string
        username: string
      meraki:
        apiKey: string
        orgIds:
          - string
      netconf:
        port: 0
      snmp:
        authPassword: string
        authType: string
        mode: string
        privacyPassword: string
        privacyType: string
        readCommunity: string
        username: string
        version: string
        writeCommunity: string
    managementAddress: string

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

dnac_response

dictionary

A dictionary or list with the response returned by the Cisco DNAC Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}`

Authors

  • Rafael Campos (@racampos)