cisco.dnac.provision_workflow_manager module -- Resource module for provision related functions
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.provision_workflow_manager.
New in cisco.dnac 6.6.0
Synopsis
Manage operations related to wired and wireless provisioning
API to re-provision provisioned devices
API to un-provision provisioned devices
Un-provisioning refers to removing a device from the inventory list
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk == 2.4.5
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
List of details of device being managed. |
|
|
|
|
|
A list of IP addresses representing the network devices on which application telemetry should be enabled or disabled. |
|
A flag that indicates whether to include guest SSID information when enabling telemetry for wireless devices. Choices: |
|
Choices: |
|
Choices: |
|
Choices: |
|
A flag that indicates whether to clean the configuration during un-provisioning a device. Choices: |
|
|
|
The gateway IP address for the interface. |
|
The IP address assigned to the interface. |
|
The name of the interface. |
|
The netmask of the interface in CIDR format (e.g., 24 for 255.255.255.0). |
|
The port number or LAG (Link Aggregation Group) identifier. |
|
The VLAN ID associated with the interface. |
|
|
|
|
|
|
|
|
|
|
|
Choices:
|
|
Choices: |
|
|
|
Management Ip Address of the device. |
|
|
|
Choices: |
|
|
|
|
|
Choices: |
|
|
|
Name of the site where the device will be added. This parameter is required for provisioning the device and assigning it to a site. |
|
Choices: |
|
Set to true to verify the Cisco Catalyst Center config after applying the playbook config. Choices: |
|
Defines the timeout in seconds for API calls to retrieve task details. If the task details are not received within this period, the process will end, and a timeout notification will be logged. Default: :ansible-option-default:`1200` |
|
Indicates whether debugging is enabled in the Cisco Catalyst Center SDK. Choices: |
|
The hostname of the Cisco Catalyst Center. |
|
Flag to enable/disable playbook execution logging. When true and dnac_log_file_path is provided, - Create the log file at the execution location with the specified name. When true and dnac_log_file_path is not provided, - Create the log file at the execution location with the name 'dnac.log'. When false, - Logging is disabled. If the log file doesn't exist, - It is created in append or write mode based on the "dnac_log_append" flag. If the log file exists, - It is overwritten or appended based on the "dnac_log_append" flag. Choices: |
|
Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. Choices: |
|
Governs logging. Logs are recorded if dnac_log is True. If path is not specified, - When 'dnac_log_append' is True, 'dnac.log' is generated in the current Ansible directory; logs are appended. - When 'dnac_log_append' is False, 'dnac.log' is generated; logs are overwritten. If path is specified, - When 'dnac_log_append' is True, the file opens in append mode. - When 'dnac_log_append' is False, the file opens in write (w) mode. - In shared file scenarios, without append mode, content is overwritten after each module execution. - For a shared log file, set append to False for the 1st module (to overwrite); for subsequent modules, set append to True. Default: :ansible-option-default:`"dnac.log"` |
|
Sets the threshold for log level. Messages with a level equal to or higher than this will be logged. Levels are listed in order of severity [CRITICAL, ERROR, WARNING, INFO, DEBUG]. CRITICAL indicates serious errors halting the program. Displays only CRITICAL messages. ERROR indicates problems preventing a function. Displays ERROR and CRITICAL messages. WARNING indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. INFO tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. DEBUG provides detailed diagnostic info. Displays all log messages. Default: :ansible-option-default:`"WARNING"` |
|
The password for authentication at the Cisco Catalyst Center. |
|
Specifies the port number associated with the Cisco Catalyst Center. Default: :ansible-option-default:`"443"` |
|
Specifies the interval in seconds between successive calls to the API to retrieve task details. Default: :ansible-option-default:`2` |
|
The username for authentication at the Cisco Catalyst Center. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Specifies the version of the Cisco Catalyst Center that the SDK should use. Default: :ansible-option-default:`"2.2.3.3"` |
|
The state of Cisco Catalyst Center after module completion. Choices: |
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
SDK Methods used are sites.Sites.get_site, devices.Devices.get_network_device_by_ip, task.Task.get_task_by_id, sda.Sda.get_provisioned_wired_device, sda.Sda.re_provision_wired_device, sda.Sda.provision_wired_device, wireless.Wireless.provision devices.Device.delete_network_device_with_configuration_cleanup, devices.Device.delete_a_network_device_without_configuration_cleanup, application_policy.ApplicationPolicy.enable_application_telemetry_feature_on_multiple_network_devices_v1, application_policy.ApplicationPolicy.disable_application_telemetry_feature_on_multiple_network_devices_v1
Paths used are get /dna/intent/api/v1/site get /dna/intent/api/v1/network-device/ip-address/{ipAddress} get /dna/intent/api/v1/task/{taskId} get /dna/intent/api/v1/business/sda/provision-device put /dna/intent/api/v1/business/sda/provision-device post /dna/intent/api/v1/business/sda/provision-device post /dna/intent/api/v1/wireless/provision delete /dna/intent/api/v1/networkDevices/deleteWithCleanup delete /dna/intent/api/v1/networkDevices/deleteWithoutCleanup post /dna/intent/api/v1/applicationVisibility/networkDevices/enableAppTelemetry post /dna/intent/api/v1/applicationVisibility/networkDevices/disableAppTelemetry
Added 'provisioning' option in v6.16.0
Added provisioning and reprovisioning of wireless devices in v6.16.0
Does not support
check_modeThe plugin runs on the control node and does not use any ansible connection plugins instead embedded connection manager from Cisco Catalyst Center SDK
The parameters starting with dnac_ are used by the Cisco Catalyst Center Python SDK to establish the connection
Examples
---
- name: Provision a wireless device to a site
cisco.dnac.provision_workflow_manager:
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:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.192.3.40
managed_ap_locations:
- Global/USA/San Francisco/BGL_18/Test_Floor2
dynamic_interfaces:
- vlan_id: 1866
interface_name: Vlan1866
interface_ip_address: 204.192.6.200
interface_gateway: 204.192.6.1
- name: Provision a wireless device to a site for version
- 2.3.7.6
cisco.dnac.provision_workflow_manager:
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:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.192.3.40
primary_managed_ap_locations:
- Global/USA/San Francisco/BGL_18/Test_Floor2
secondary_managed_ap_locations:
- Global/USA/San Francisco/BGL_18/Test_Floor1
dynamic_interfaces:
- interface_name: Vlan1866
vlan_id: 1866
interface_ip_address: 204.192.6.200
interface_gateway: 204.192.6.1
skip_ap_provision: false
rolling_ap_upgrade:
enable_rolling_ap_upgrade: false
ap_reboot_percentage: 5
ap_authorization_list_name: "AP-Auth-List"
authorize_mesh_and_non_mesh_aps: true
- name: Provision a wired device to a site
cisco.dnac.provision_workflow_manager:
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:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.192.3.40
- name: Re-Provision a wired device to a site forcefully
cisco.dnac.provision_workflow_manager:
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:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.192.3.40
force_provisioning: true
- name: Assign a wired device to a site
cisco.dnac.provision_workflow_manager:
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:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.192.3.40
provisioning: false
- name: Provision a wireless device to a site
cisco.dnac.provision_workflow_manager:
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_verify: true
config:
- site_name_hierarchy: Global/USA/RTP/BLD11
management_ip_address: 204.192.12.201
managed_ap_locations:
- Global/USA/RTP/BLD11/BLD11_FLOOR1
- name: Unprovision a device from a site
cisco.dnac.provision_workflow_manager:
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: deleted
config_verify: true
config:
- management_ip_address: 204.1.2.2
- name: Unprovision a device from a site
cisco.dnac.provision_workflow_manager:
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: deleted
config_verify: true
config:
- management_ip_address: 204.1.2.2
clean_config: true
- name: Configure application telemetry for network
devices on Cisco Catalyst Center
hosts: localhost
connection: local
gather_facts: false
vars_files:
- "credentials.yml"
tasks:
- name: Enable application telemetry on specified
network devices
cisco.dnac.provision_workflow_manager:
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
dnac_log_level: DEBUG
config_verify: false
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- application_telemetry:
- device_ips: ["204.1.1.2", "204.192.6.200"]
telemetry: enable
wlan_mode: LOCAL
include_guest_ssid: true
- name: Configure application telemetry for network
devices on Cisco Catalyst Center
hosts: localhost
connection: local
gather_facts: false
vars_files:
- "credentials.yml"
tasks:
- name: Disable application telemetry on specified
network devices
cisco.dnac.provision_workflow_manager:
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
dnac_log_level: DEBUG
config_verify: false
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- application_telemetry:
- device_ips: ["204.1.1.2", "204.192.6.200"]
telemetry: disable
- name: Provision a wireless device to a site with feature template
cisco.dnac.provision_workflow_manager:
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
dnac_log_level: DEBUG
config_verify: false
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- site_name_hierarchy: Global/USA/SAN JOSE/BLD23
management_ip_address: 204.192.4.2
primary_managed_ap_locations:
- Global/USA/SAN JOSE/BLD23/FLOOR1_LEVEL2
feature_template:
- design_name: newtest
additional_identifiers:
wlan_profile_name: ARUBA_SSID_profile
site_name_hierarchy: Global/USA/SAN JOSE/BLD23
excluded_attributes: ["guest_ssid_settings", "bandwidth_limits"]
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A dictionary with details of provision is returned Returned: always |
|
A list with the response returned by the Cisco Catalyst Center Python SDK Returned: always Sample: :ansible-rv-sample-value:`["{\\n \\"response\\": []", "\\n \\"msg\\": String\\n}\\n"]` |
|
A dictionary with the exisiting details as returned by the Cisco Cisco Catalyst Center Python SDK Returned: always Sample: :ansible-rv-sample-value:`"{\\n \\"response\\": String,\\n \\"msg\\": String\\n}\\n"` |
Authors
Abinash Mishra (@abimishr) Madhan Sankaranarayanan (@madhansansel) Syed Khadeer Ahmed(@syed-khadeerahmed) Ajith Andrew J (@ajithandrewj)