cisco.dnac.pnp_workflow – Resource module for Pnp Workflow
Note
This plugin is part of the cisco.dnac collection (version 4.1.3).
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
.
To use it in a playbook, specify: cisco.dnac.pnp_workflow
.
New in version 3.1.0: of cisco.dnac
Synopsis
Manage operations create, update and delete of the resource Pnp Workflow.
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
Deletes a workflow specified by id.
Note
This module has a corresponding action plugin.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk >= 2.4.0
python >= 3.5
Parameters
Parameter |
Comments |
---|---|
Pnp Workflow’s _id. |
|
Pnp Workflow’s addedOn. |
|
AddToInventory flag. Choices:
|
|
Pnp Workflow’s configId. |
|
Pnp Workflow’s currTaskIdx. |
|
Pnp Workflow’s description. |
|
Flag for Cisco DNA Center SDK to enable debugging. Choices:
|
|
The Cisco DNA Center hostname. |
|
The Cisco DNA Center password to authenticate. |
|
The Cisco DNA Center port. Default: 443 |
|
The Cisco DNA Center username to authenticate. Default: “admin” |
|
Flag to enable or disable SSL certificate verification. Choices:
|
|
Informs the SDK which version of Cisco DNA Center to use. Default: “2.2.3.3” |
|
Pnp Workflow’s endTime. |
|
Pnp Workflow’s execTime. |
|
Id path parameter. |
|
Pnp Workflow’s imageId. |
|
Pnp Workflow’s instanceType. |
|
Pnp Workflow’s lastupdateOn. |
|
Pnp Workflow’s name. |
|
Pnp Workflow’s startTime. |
|
Pnp Workflow’s state. |
|
Pnp Workflow’s tasks. |
|
Pnp Workflow’s currWorkItemIdx. |
|
Pnp Workflow’s endTime. |
|
Pnp Workflow’s name. |
|
Pnp Workflow’s startTime. |
|
Pnp Workflow’s state. |
|
Pnp Workflow’s taskSeqNo. |
|
Pnp Workflow’s timeTaken. |
|
Pnp Workflow’s type. |
|
Pnp Workflow’s workItemList. |
|
Pnp Workflow’s command. |
|
Pnp Workflow’s endTime. |
|
Pnp Workflow’s outputStr. |
|
Pnp Workflow’s startTime. |
|
Pnp Workflow’s state. |
|
Pnp Workflow’s timeTaken. |
|
Pnp Workflow’s tenantId. |
|
Pnp Workflow’s type. |
|
Pnp Workflow’s useState. |
|
Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. Choices:
|
|
Pnp Workflow’s version. |
Notes
Note
SDK Method used are device_onboarding_pnp.DeviceOnboardingPnp.update_workflow, device_onboarding_pnp.DeviceOnboardingPnp.add_a_workflow, device_onboarding_pnp.DeviceOnboardingPnp.delete_workflow_by_id
Paths used are post /dna/intent/api/v1/onboarding/pnp-workflow, delete /dna/intent/api/v1/onboarding/pnp-workflow/{id}
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: Create
cisco.dnac.pnp_workflow:
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}}"
state: present
_id: string
addToInventory: true
addedOn: 0
configId: string
currTaskIdx: 0
description: string
endTime: 0
execTime: 0
imageId: string
instanceType: string
lastupdateOn: 0
name: string
startTime: 0
state_: string
tasks:
- currWorkItemIdx: 0
endTime: 0
name: string
startTime: 0
state: string
taskSeqNo: 0
timeTaken: 0
type: string
workItemList:
- command: string
endTime: 0
outputStr: string
startTime: 0
state: string
timeTaken: 0
tenantId: string
type: string
useState: string
version: 0
- name: Delete by id
cisco.dnac.pnp_workflow:
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}}"
state: absent
id: string
- name: Update by id
cisco.dnac.pnp_workflow:
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}}"
state: present
_id: string
addToInventory: true
addedOn: 0
configId: string
currTaskIdx: 0
description: string
endTime: 0
execTime: 0
id: string
imageId: string
instanceType: string
lastupdateOn: 0
name: string
startTime: 0
state_: string
tasks:
- currWorkItemIdx: 0
endTime: 0
name: string
startTime: 0
state: string
taskSeqNo: 0
timeTaken: 0
type: string
workItemList:
- command: string
endTime: 0
outputStr: string
startTime: 0
state: string
timeTaken: 0
tenantId: string
type: string
useState: string
version: 0
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary or list with the response returned by the Cisco DNAC Python SDK Returned: always Sample: “{\n \”_id\”: \”string\”,\n \”state\”: \”string\”,\n \”type\”: \”string\”,\n \”description\”: \”string\”,\n \”lastupdateOn\”: 0,\n \”imageId\”: \”string\”,\n \”currTaskIdx\”: 0,\n \”addedOn\”: 0,\n \”tasks\”: [\n {\n \”state\”: \”string\”,\n \”type\”: \”string\”,\n \”currWorkItemIdx\”: 0,\n \”taskSeqNo\”: 0,\n \”endTime\”: 0,\n \”startTime\”: 0,\n \”workItemList\”: [\n {\n \”state\”: \”string\”,\n \”command\”: \”string\”,\n \”outputStr\”: \”string\”,\n \”endTime\”: 0,\n \”startTime\”: 0,\n \”timeTaken\”: 0\n }\n ],\n \”timeTaken\”: 0,\n \”name\”: \”string\”\n }\n ],\n \”addToInventory\”: true,\n \”instanceType\”: \”string\”,\n \”endTime\”: 0,\n \”execTime\”: 0,\n \”startTime\”: 0,\n \”useState\”: \”string\”,\n \”configId\”: \”string\”,\n \”name\”: \”string\”,\n \”version\”: 0,\n \”tenantId\”: \”string\”\n}\n” |