cisco.dnac.network_profile_switching_workflow_manager module – Resource module for managing network switch profiles with template and site assignments in Cisco Catalyst Center
Note
This module is part of the cisco.dnac collection (version 6.40.0).
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.network_profile_switching_workflow_manager
.
New in cisco.dnac 6.31.0
Synopsis
This module facilitates comprehensive network switch profile management in Cisco Catalyst Center. - Supports creating, updating, and deleting switch profiles with Day-N template assignments. - Enables profile assignment to sites within the site hierarchy for network standardization. - Provides selective site and template unassignment capabilities for profile lifecycle management. - Supports bulk profile operations for enterprise-scale network infrastructure deployment. - Integrates with Cisco Catalyst Center’s network profile framework for consistent switching configuration.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk >= 2.8.6
python >= 3.9
Parameters
Parameter |
Comments |
---|---|
A list containing the comprehensive details required for network switch profile creation, assignment, and lifecycle management. Each profile configuration supports template assignments, site associations, and operational state management for enterprise network infrastructure standardization and automation. |
|
A list of Day-N template names assigned to the profile for ongoing device configuration. Day-N templates provide post-deployment configuration management including compliance, monitoring, and operational configuration updates for network devices. Templates must exist in Catalyst Center before assignment to profiles. Maximum length per template: 200 characters. Supports multiple template assignment for comprehensive device lifecycle management. |
|
A list of onboarding template names to be assigned to the profile for device provisioning. Note: Onboarding templates are currently unavailable due to SDK/API upgrade constraints. This feature will be available in an upcoming release with enhanced template support. Reserved for future functionality - do not use in current implementations. |
|
The unique name of the switch profile to be created or managed. Profile names must be unique within the Cisco Catalyst Center instance and should follow organizational naming conventions for network infrastructure. Maximum length: 255 characters. |
|
A list of site names specified in the full site hierarchy format for profile assignment. Sites must exist in the Catalyst Center site hierarchy before profile assignment. Format examples: ‘Global/Country/City/Building’ or ‘Global/Region/Campus/Floor’. Maximum length per site: 200 characters. Supports bulk site assignment for scalable network profile deployment. |
|
Set to `True` to enable configuration verification on Cisco Catalyst Center after applying the playbook configuration. This ensures that the system validates the configuration state after the changes are applied. 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: |
|
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: |
|
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: |
|
The password for authentication at the Cisco Catalyst Center. |
|
Specifies the port number associated with the Cisco Catalyst Center. Default: |
|
Specifies the interval in seconds between successive calls to the API to retrieve task details. Default: |
|
The username for authentication at the Cisco Catalyst Center. Default: |
|
Flag to enable or disable SSL certificate verification. Choices:
|
|
Specifies the version of the Cisco Catalyst Center that the SDK should use. Default: |
|
Specifies the desired operational state for switch profile configuration management. - merged: Creates new switch profiles or updates existing profiles by adding/modifying template assignments and site associations. Supports incremental profile enhancement. - deleted: Removes switch profiles, unassigns sites, or detaches templates based on the configuration provided. Supports selective deletion for profile lifecycle management. Choices:
|
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices:
|
Notes
Note
This module utilizes the following SDK methods site_design.retrieves_the_list_of_sites_that_the_given_network_profile_for_sites_is_assigned_to_v1 site_design.assign_sites site_design.retrieves_the_list_of_network_profiles_for_sites_v1 site_design.assign_a_network_profile_for_sites_to_the_given_site_v1 site_design.unassigns_a_network_profile_for_sites_from_multiple_sites_v1 site_design.deletes_a_network_profile_for_sites_v1 configuration_templates.gets_the_templates_available_v1 network_settings.retrieve_cli_templates_attached_to_a_network_profile_v1
The following API paths are used GET /dna/intent/api/v1/networkProfilesForSites GET /dna/intent/api/v1/template-programmer/template GET /dna/intent/api/v1/networkProfilesForSites/{profileId}/templates POST /dna/intent/api/v1/networkProfilesForSites/{profileId}/siteAssignments POST /dna/intent/api/v1/networkProfilesForSites/{profileId}/siteAssignments/bulk POST /api/v1/siteprofile
Does not support
check_mode
The 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
---
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: false
connection: local
tasks:
# Create a comprehensive switching profile with Day-N templates and site assignments
- name: Create enterprise switching profile for campus network infrastructure
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- profile_name: "Campus_Switching_Profile"
day_n_templates:
- "Campus_Switch_Config_Update"
site_names:
- "Global/India/Chennai"
- "Global/India/Mumbai"
# Update existing switching profile with additional templates and sites
- name: Update enterprise switching profile for multi-region deployment
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- profile_name: "Enterprise_Switching_Profile"
day_n_templates:
- "Periodic_Config_Audit"
- "Security_Compliance_Check"
site_names:
- "Global/India/Chennai/Main_Office"
- "Global/India/Madurai/Branch_Office"
- "Global/USA/San_Francisco/Regional_HQ"
# Demonstrate idempotent deletion of multiple switching profiles
- name: Remove obsolete switching profiles from network infrastructure
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: deleted
config:
- profile_name: "Legacy_Switching_Profile"
- profile_name: "Deprecated_Local_Profile"
# Complete profile removal including all associated configurations
- name: Delete switching profile and verify removal from network infrastructure
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: deleted
config:
- profile_name: "Enterprise_Switching_Profile"
# Selective site unassignment while preserving profile and templates
- name: Unassign specific sites from switching profile for network reorganization
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: deleted
config:
- profile_name: "Enterprise_Switching_Profile"
site_names:
- "Global/India/Chennai/Main_Office"
# Selective template unassignment for configuration template management
- name: Remove specific templates from switching profile for template lifecycle management
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: deleted
config:
- profile_name: "Enterprise_Switching_Profile"
day_n_templates:
- "Outdated_Config_Template"
# Bulk profile creation for large-scale network deployment
- name: Create multiple switching profiles for enterprise network standardization
cisco.dnac.network_profile_switching_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: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged
config:
- profile_name: "Campus_Core_Switching"
day_n_templates:
- "Core_Switch_Config"
- "OSPF_Configuration"
site_names:
- "Global/Headquarters/Core_Network"
- profile_name: "Branch_Access_Switching"
day_n_templates:
- "Access_Switch_Config"
- "VLAN_Configuration"
site_names:
- "Global/Branch_Offices/Remote_Sites"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK when a switch profile is successfully created. The response confirms the successful creation of the profile and provides details about the profile, including its name and status. Returned: always Sample: |
|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK. This response is provided when attempting to delete switching profiles in an idempotent manner. If the profiles are already deleted, the response indicates that no changes were required. Returned: always Sample: |
|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK when a switch profile is successfully deleted or unassigned. The response confirms the deletion/unassignment and provides details of the profile and its associated operations. Returned: always Sample: |
|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK when a site is successfully unassigned from a switch profile. The response confirms the unassignment and provides details about the profile and site(s) affected. Returned: always Sample: |
|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK when a template is successfully unassigned from a switch profile. The response confirms the unassignment and provides details about the profile and the template(s) affected. Returned: always Sample: |
|
A dictionary or list containing the response returned by the Cisco Catalyst Center Python SDK when a switch profile is successfully updated. The response confirms the successful update of the profile and provides details about the profile, including its name and status. Returned: always Sample: |