• AnsibleFest
  • Products
  • Community
  • Webinars & Training
  • Blog
Ansible Logo
Documentation
Ansible
devel

Ansible getting started

  • Getting started with Ansible
  • Getting started with Execution Environments

Installation, Upgrade & Configuration

  • Installation Guide
  • Ansible Porting Guides

Using Ansible

  • Building Ansible inventories
  • Using Ansible command line tools
  • Using Ansible playbooks
  • Protecting sensitive data with Ansible vault
  • Using Ansible modules and plugins
  • Using Ansible collections
  • Using Ansible on Windows and BSD
  • Ansible tips and tricks

Contributing to Ansible

  • Ansible Community Guide
  • Ansible Collections Contributor Guide
  • ansible-core Contributors Guide
  • Advanced Contributor Guide
  • Ansible documentation style guide

Extending Ansible

  • Developer Guide

Common Ansible Scenarios

  • Legacy Public Cloud Guides
  • Network Technology Guides
  • Virtualization and Containerization Guides

Network Automation

  • Network Getting Started
  • Network Advanced Topics
  • Network Developer Guide

Ansible Galaxy

  • Galaxy User Guide
  • Galaxy Developer Guide

Reference & Appendices

  • Collection Index
    • Collections in the Amazon Namespace
    • Collections in the Ansible Namespace
    • Collections in the Arista Namespace
    • Collections in the Awx Namespace
    • Collections in the Azure Namespace
    • Collections in the Check_point Namespace
    • Collections in the Chocolatey Namespace
    • Collections in the Cisco Namespace
      • Cisco.Aci
      • Cisco.Asa
      • Cisco.Dnac
        • Description
        • Plugin Index
      • Cisco.Intersight
      • Cisco.Ios
      • Cisco.Iosxr
      • Cisco.Ise
      • Cisco.Meraki
      • Cisco.Mso
      • Cisco.Nxos
      • Cisco.Ucs
    • Collections in the Cloud Namespace
    • Collections in the Cloudscale_ch Namespace
    • Collections in the Community Namespace
    • Collections in the Containers Namespace
    • Collections in the Cyberark Namespace
    • Collections in the Dellemc Namespace
    • Collections in the F5networks Namespace
    • Collections in the Fortinet Namespace
    • Collections in the Frr Namespace
    • Collections in the Gluster Namespace
    • Collections in the Google Namespace
    • Collections in the Grafana Namespace
    • Collections in the Hetzner Namespace
    • Collections in the Hpe Namespace
    • Collections in the Ibm Namespace
    • Collections in the Infinidat Namespace
    • Collections in the Infoblox Namespace
    • Collections in the Inspur Namespace
    • Collections in the Junipernetworks Namespace
    • Collections in the Kubernetes Namespace
    • Collections in the Lowlydba Namespace
    • Collections in the Microsoft Namespace
    • Collections in the Netapp Namespace
    • Collections in the Netapp_eseries Namespace
    • Collections in the Netbox Namespace
    • Collections in the Ngine_io Namespace
    • Collections in the Openstack Namespace
    • Collections in the Openvswitch Namespace
    • Collections in the Ovirt Namespace
    • Collections in the Purestorage Namespace
    • Collections in the Sensu Namespace
    • Collections in the Splunk Namespace
    • Collections in the T_systems_mms Namespace
    • Collections in the Telekom_mms Namespace
    • Collections in the Theforeman Namespace
    • Collections in the Vmware Namespace
    • Collections in the Vultr Namespace
    • Collections in the Vyos Namespace
    • Collections in the Wti Namespace
  • Indexes of all modules and plugins
  • Playbook Keywords
  • Return Values
  • Ansible Configuration Settings
  • Controlling how Ansible behaves: precedence rules
  • YAML Syntax
  • Python 3 Support
  • Interpreter Discovery
  • Releases and maintenance
  • Testing Strategies
  • Sanity Tests
  • Frequently Asked Questions
  • Glossary
  • Ansible Reference: Module Utilities
  • Special Variables
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • Logging Ansible output

Roadmaps

  • Ansible Roadmap
  • ansible-core Roadmaps




Ansible
  • Collection Index
  • Collections in the Cisco Namespace
  • Cisco.Dnac
  • cisco.dnac.pnp_intent module – Resource module for Site and PnP related functions


cisco.dnac.pnp_intent module – Resource module for Site and PnP related functions

Note

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

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

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.pnp_intent.

New in cisco.dnac 6.6.0

  • Synopsis

  • Requirements

  • Parameters

  • Notes

  • Examples

  • Return Values

Synopsis

  • Manage operations add device, claim device and unclaim device of Onboarding Configuration(PnP) resource

  • API to add device to pnp inventory and claim it to a site.

  • API to delete device from the pnp inventory.

Requirements

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

  • dnacentersdk == 2.6.5

  • python >= 3.5

Parameters

Parameter

Comments

config

list / elements=dictionary / required

List of details of device being managed.

deviceInfo

dictionary / required

Pnp Device’s deviceInfo.

add_device_method

string

Pnp Device’s device addition method (Single/Bulk/Smart Account).

hostname

string

Pnp Device’s hostname.

isSudiRequired

boolean

Sudi Authentication requiremnet’s flag.

Choices:

  • false

  • true

pid

string

Pnp Device’s pid.

serialNumber

string

Pnp Device’s serialNumber.

state

string

Pnp Device’s onbording state (Unclaimed/Claimed/Provisioned).

gateway

string

Gateway IP address of the Wireless Controller for getting pinged

golden_image

boolean

Is the image to be condifgured tagged as golden image

Choices:

  • false

  • true

image_name

string

Name of image to be configured on the device

ipInterfaceName

string

Name of the Interface used for Pnp by the Wireless Controller

pnp_type

string

Device type of the Pnp device (Default/CatalystWLC/AccessPoint)

Default: "Default"

projectName

string

Name of the project under which the template is present

Default: "Onboarding Configuration"

rfProfile

string

rfprofile of the AP being claimed (HIGH/LOW/TYPICAL)

site_name

string

Name of the site for which device will be claimed.

staticIP

string

Management IP address of the Wireless Controller

subnetMask

string

Subnet Mask of the Management IP address of the Wireless Controller

template_name

string

Name of template to be configured on the device.

vlanId

string

Vlan Id allocated for claimimg of Wireless Controller

dnac_debug

boolean

Flag for Cisco DNA Center SDK to enable debugging.

Choices:

  • false ← (default)

  • true

dnac_host

string / required

The Cisco DNA Center hostname.

dnac_log

boolean

Flag for logging playbook execution details. If set to true the log file will be created at the location of the execution with the name dnac.log

Choices:

  • false ← (default)

  • true

dnac_password

string

The Cisco DNA Center password to authenticate.

dnac_port

string

The Cisco DNA Center port.

Default: "443"

dnac_username

aliases: user

string

The Cisco DNA Center username to authenticate.

Default: "admin"

dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

  • false

  • true ← (default)

dnac_version

string

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

Default: "2.2.3.3"

state

string

The state of DNAC after module completion.

Choices:

  • "merged" ← (default)

  • "deleted"

validate_response_schema

boolean

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

Choices:

  • false

  • true ← (default)

Notes

Note

  • SDK Method used are device_onboarding_pnp.DeviceOnboardingPnp.add_device, device_onboarding_pnp.DeviceOnboardingPnp.get_device_list, device_onboarding_pnp.DeviceOnboardingPnp.claim_a_device_to_a_site, device_onboarding_pnp.DeviceOnboardingPnp.delete_device_by_id_from_pnp, device_onboarding_pnp.DeviceOnboardingPnp.get_device_count, sites.Sites.get_site, software_image_management_swim.SoftwareImageManagementSwim.get_software_image_details, configuration_templates.ConfigurationTemplates.gets_the_templates_available

  • Paths used are post /dna/intent/api/v1/onboarding/pnp-device post /dna/intent/api/v1/onboarding/pnp-device/site-claim post /dna/intent/api/v1/onboarding/pnp-device/{id} get /dna/intent/api/v1/onboarding/pnp-device/count get /dna/intent/api/v1/onboarding/pnp-device get /dna/intent/api/v1/site get /dna/intent/api/v1/image/importation get /dna/intent/api/v1/template-programmer/template

  • 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

Examples

- name: Add a new device and claim the device
  cisco.dnac.pnp_intent:
    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}}"
    dnac_log: True
    state: merged
    config:
        - template_name: string
          image_name: string
          golden_image: bool
          site_name: string
          projectName: string
          pnp_type: string
          staticIP: string
          subnetMask: string
          gateway: string
          vlanId: string
          ipInterfaceName: string
          rfProfile: string
          deviceInfo:
            hostname: string
            state: string
            pid: string
            serialNumber: string
            add_device_method: string
            isSudiRequired: string

Return Values

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

Key

Description

response_1

dictionary

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

Returned: always

Sample: "{\n  \"response\":\n    {\n      \"response\": String,\n      \"version\": String\n    },\n  \"msg\": String\n}\n"

response_2

list / elements=string

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

Returned: always

Sample: ["{\n  \"response\": []", "\n  \"msg\": String\n}\n"]

response_3

dictionary

A string with the response returned by the Cisco DNAC Python SDK

Returned: always

Sample: "{\n  \"response\": String,\n  \"msg\": String\n}\n"

Authors

  • Madhan Sankaranarayanan (@madhansansel) Rishita Chowdhary (@rishitachowdhary) Abinash Mishra (@abimishr)

Collection links

  • Issue Tracker
  • Repository (Sources)
Previous Next

© Copyright Ansible project contributors. Last updated on Dec 02, 2023.