cisco.dnac.site_workflow_manager module – Manage hierarchical sites in Cisco Catalyst Center

Note

This module is part of the cisco.dnac collection (version 6.39.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.site_workflow_manager.

New in cisco.dnac 6.6.0

Synopsis

  • Complete management of sites in Cisco Catalyst Center, including hierarchical structures of areas, buildings, and floors.

  • Creates single or multiple sites with specified hierarchical relationships.

  • Updates existing site configurations, including physical attributes and RF characteristics.

  • Deletes sites and their components when no longer needed.

  • Supports bulk operations for efficiently managing multiple sites simultaneously.

  • Handles floor maps and RF modeling for wireless network planning.

  • Provides verification of site configurations after changes are applied.

Requirements

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

  • dnacentersdk == 2.4.5

  • python >= 3.9

Parameters

Parameter

Comments

config

list / elements=dictionary / required

List of site configurations to be created, updated, or deleted.

Each item represents a single site operation.

Required for all operations as it defines the target sites and their configurations.

site

dictionary

Contains the detailed configuration for the site being managed.

Only one site component type (area, building, or floor) should be specified in each config entry.

area

dictionary

Configuration specific to an area-type site.

Areas represent the highest level in the site hierarchy, typically representing geographical regions, campuses, or other logical divisions.

name

string / required

Name of the area to create, update, or delete.

Must be unique within its parent site.

parent_name

string / required

Full hierarchical path of the parent site.

Format should be slash-separated notation (For example, “Global/USA”).

For top-level areas, the parent is typically “Global”.

building

dictionary

Configuration specific to a building-type site.

Buildings represent physical structures within an area and contain floors.

address

string / required

Physical street address of the building.

Used for geographical positioning and identification.

country

string

The country where the building is located.

Optional parameter for additional geolocation context.

latitude

float / required

Geographical latitude coordinate of the building.

Must be between -90.0 and +90.0 degrees.

For Example, 37.338 for a location in San Jose, California.

Required for creating buildings, optional when updating.

longitude

float / required

Geographical longitude coordinate of the building.

Must be between -180.0 and +180.0 degrees.

For Example, -121.832 for a location in San Jose, California.

Required for creating buildings, optional when updating.

name

string / required

Name of the building to create, update, or delete.

Must be unique within its parent area.

parent_name

string / required

Full hierarchical path of the parent area.

Format should be slash-separated (e.g., “Global/USA/California”).

The parent must exist before creating the building.

floor

dictionary

Configuration specific to a floor-type site.

Floors represent levels within a building and can contain network devices and floor plans.

floor_number

integer / required

Numerical identifier for the floor within the building. - Required for floor creation from Catalyst Center version 2.3.7.6 onwards. - Once set, this value cannot be modified. - For example, 1 for first floor, 0 for ground floor, -1 for basement.

force_upload_floor_image

boolean

Controls whether to upload or update the floor image. - When true, the floor image specified in upload_floor_image_path will be uploaded or updated, even if the floor already has an image. - When false, image upload is skipped during updates. - During initial floor creation, if upload_floor_image_path is provided, the image will be uploaded regardless of this setting. - Set to true to replace an existing floor image during an update operation.

Choices:

  • false ← (default)

  • true

height

float / required

Height of the floor in the specified units (default is feet).

Represents the ceiling height, important for RF planning and signal propagation modeling.

length

float / required

Length of the floor in the specified units (default is feet).

Used for defining the floor dimensions for mapping purposes.

name

string / required

Name of the floor to create, update, or delete.

Must be unique within its parent building.

parent_name

string / required

Full hierarchical path of the parent building.

Format should be slash-separated notation (For example, “Global/USA/California/Building_1”).

rf_model

string / required

RF (Radio Frequency) model type for the floor, essential for wireless network planning. Select one of the following options based on your environment: - “Cubes And Walled Offices”: For indoor areas with cubicles or walled offices, where signal propagation is affected by walls and partitions. - “Drywall Office Only”: For environments with drywall partitions (typically office spaces), which have moderate signal attenuation. - “Indoor High Ceiling”: For spaces with high ceilings (e.g., auditoriums, warehouses), where vertical propagation patterns differ significantly. - “Outdoor Open Space”: For outdoor areas with minimal obstruction, suitable for outdoor deployments or open campuses. The chosen RF model affects how the system calculates wireless coverage and capacity.

Choices:

  • "Cubes And Walled Offices"

  • "Drywall Office Only"

  • "Indoor High Ceiling"

  • "Outdoor Open Space"

units_of_measure

string

Unit of measurement for floor dimensions (height, length, and width). - Available from Catalyst Center version 2.3.7.6 onwards. - Default is ‘feet’ if not specified.

Choices:

  • "feet" ← (default)

  • "meters"

upload_floor_image_path

string

Local file path to an image that will be uploaded as the floor plan.

Supported formats include JPG, PNG, and PDF.

Feature available from Catalyst Center version 2.3.7.6 onwards.

width

float / required

Width of the floor in the specified units (default is feet).

Used for defining the floor dimensions for mapping purposes.

site_type

string / required

Specifies the type of site component to manage.

Must be one of “area”, “building”, or “floor”.

Choices:

  • "area"

  • "building"

  • "floor"

config_verify

boolean

Controls whether to verify site configurations after applying changes.

When set to true, the module will confirm that site creation, updates, or deletion operations have been successfully completed in Cisco Catalyst Center.

Choices:

  • false ← (default)

  • true

dnac_api_task_timeout

integer

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: 1200

dnac_debug

boolean

Indicates whether debugging is enabled in the Cisco Catalyst Center SDK.

Choices:

  • false ← (default)

  • true

dnac_host

string / required

The hostname of the Cisco Catalyst Center.

dnac_log

boolean

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:

  • false ← (default)

  • true

dnac_log_append

boolean

Determines the mode of the file. Set to True for ‘append’ mode. Set to False for ‘write’ mode.

Choices:

  • false

  • true ← (default)

dnac_log_file_path

string

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: "dnac.log"

dnac_log_level

string

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: "WARNING"

dnac_password

string

The password for authentication at the Cisco Catalyst Center.

dnac_port

string

Specifies the port number associated with the Cisco Catalyst Center.

Default: "443"

dnac_task_poll_interval

integer

Specifies the interval in seconds between successive calls to the API to retrieve task details.

Default: 2

dnac_username

aliases: user

string

The username for authentication at the Cisco Catalyst Center.

Default: "admin"

dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

  • false

  • true ← (default)

dnac_version

string

Specifies the version of the Cisco Catalyst Center that the SDK should use.

Default: "2.2.3.3"

state

string

Defines the intended state of the sites after module execution.

merged will create new sites or update existing ones.

deleted will remove the specified sites from Cisco Catalyst Center.

Choices:

  • "merged" ← (default)

  • "deleted"

validate_response_schema

boolean

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

Choices:

  • false

  • true ← (default)

Notes

Note

  • Floor number and units_of_measure require Catalyst Center version 2.3.7.6 or later.

  • Floor image upload is available from version 2.3.7.6 onwards.

  • Module requires dnacentersdk 2.4.5 or later.

  • Primary SDK Methods - sites.Sites.create_site, sites.Sites.update_site, sites.Sites.delete_site - site.Sites.create_sites, site.Sites.update_a_floor, site.Sites.update_a_building - site.Sites.update_an_area, site.Sites.delete_a_floor, site.Sites.delete_a_building - site.Sites.delete_an_area, site.Sites.get_site_assigned_network_devices

  • API Endpoints - POST /dna/intent/api/v1/site, PUT dna/intent/api/v1/site/{siteId} - DELETE dna/intent/api/v1/site/{siteId} DELETE/dna/intent/api/v2/buildings/{id} - DELETE/dna/intent/api/v1/areas/{id} DELETE/dna/intent/api/v2/floors/{id} PUT/dna/intent/api/v2/floors/{id} - PUT/dna/intent/api/v1/areas/{id} PUT/dna/intent/api/v2/buildings/{id} GET/dna/intent/api/v1/sites - POST/dna/intent/api/v1/sites/bulk GET/dna/intent/api/v1/networkDevices/assignedToSite

  • Sites must be created in order - areas first, then buildings, then floors.

  • Deleting a parent site will automatically delete all child sites.

  • RF models significantly impact wireless planning and should be selected based on the actual physical environment.

  • Floor dimensions (height, length, width) and RF models can be updated after creation, but floor_number cannot be modified once set.

  • Floor images, once uploaded, remain associated with the floor until explicitly replaced using force_upload_floor_image to true.

  • Large floor plan images may take time to upload; ensure the connection to Catalyst Center remains stable during upload.

  • Latitude must be between -90.0 and +90.0 degrees, with positive values representing north of the equator.

  • Longitude must be between -180.0 and +180.0 degrees, with positive values representing east of the prime meridian.

  • Use precise coordinates for buildings to ensure accurate positioning on maps and integration with location services.

  • Use unique names for sites to avoid confusion in complex hierarchies.

  • For bulk operations, limit the number of sites to avoid timeout issues.

  • Floor image uploads for multiple floors may impact performance; consider spreading large uploads across multiple tasks.

  • Site operations on a large scale (many floors or buildings) may take considerable time to complete.

  • Site names are case-sensitive in Catalyst Center; ensure consistent casing in your playbooks.

  • 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

See Also

See also

Cisco Catalyst Center API Documentation

Complete API reference for device management.

Site Management API

Specific documentation for site operations in Catalyst Center version.

Examples

- name: Create a new area site
  cisco.dnac.site_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_level: "{{dnac_log_level}}"
    dnac_log: "{{dnac_log}}"
    state: merged
    config:
      - site:
          area:
            name: Test
            parent_name: Global/India
        site_type: area

- name: Create a new building site
  cisco.dnac.site_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_level: "{{dnac_log_level}}"
    dnac_log: "{{dnac_log}}"
    state: merged
    config:
      - site:
          building:
            name: Building_1
            parent_name: Global/India
            address: Bengaluru, Karnataka, India
            latitude: 24.12
            longitude: 23.45
        site_type: building

- name: Create a Floor site under the building
  cisco.dnac.site_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_level: "{{dnac_log_level}}"
    dnac_log: "{{dnac_log}}"
    state: merged
    config:
      - site:
          floor:
            name: Floor_1
            parent_name: Global/India/Building_1
            length: 75.76
            width: 35.54
            height: 30.12
            rf_model: Cubes And Walled Offices
            floor_number: 2
        site_type: floor

- name: Updating the Floor details under the building
  cisco.dnac.site_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_level: "{{dnac_log_level}}"
    dnac_log: "{{dnac_log}}"
    state: merged
    config:
      - site:
          floor:
            name: Floor_1
            parent_name: Global/India/Building_1
            length: 75.76
            width: 35.54
            height: 30.12
        site_type: floor

- name: Deleting any site you need site name and parent name
  cisco.dnac.site_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_level: "{{dnac_log_level}}"
    dnac_log: "{{dnac_log}}"
    state: deleted
    config:
      - site:
          floor:
            name: Floor_1
            parent_name: Global/India/Building_1
        site_type: floor

- name: Create bulk sites and upload floor map
  cisco.dnac.site_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
    state: merged
    config:
      - site:
          area:
            name: bangalore99
            parent_name: Global
        type: area
      - site:
          building:
            name: s1
            address: 1234 Elm Street3
            parent_name: Global/bangalore99
            latitude: 37.373
            longitude: -121.873
            country: india
        type: building
      - site:
          floor:
            name: cherry88
            parent_name: Global/bangalore99/s1
            rf_model: Outdoor Open Space
            width: 117
            length: 117
            height: 13
            floor_number: 3
            units_of_measure: "feet"
            upload_floor_image_path: "/Users/skesali/Downloads/pngegg.png"
            force_upload_floor_image: true
        type: floor
      - site:
          floor:
            name: cherry5
            parent_name: Global/bangalore9/s1
            rf_model: Outdoor Open Space
            width: 113
            length: 113
            height: 13
            floor_number: 3
            units_of_measure: "feet"
            upload_floor_image_path: "/Users/skesali/Downloads/pngegg.png"
            force_upload_floor_image: true
        type: floor

Return Values

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

Key

Description

response_1

dictionary

Detailed API execution results when a site is successfully created, updated, or deleted.

Contains execution IDs, timestamps, status, and site identifiers.

Returned: when a site operation succeeds

Sample: {"msg": "Site Global/USA/California/San Jose/Building_1 successfully created", "response": {"bapiExecutionId": "2f259f38-a005-4f44-9feb-a168312b503c", "bapiKey": "12345", "bapiName": "Sites", "endTime": "2025-07-25 14:32:45", "endTimeEpoch": 1658756565000, "runtimeInstanceId": "cisco-catc-01", "siteId": "9d963198-8ea0-4b1b-afe7-04401c9fd345", "startTime": "2025-07-25 14:32:30", "startTimeEpoch": 1658756550000, "status": "SUCCESS", "timeDuration": 15}}

response_2

dictionary

Information about sites that already exist and do not require an update.

Useful for idempotency checks and verification that sites are in the desired state.

Returned: when a site exists but doesn’t need updating

Sample: {"msg": "Site Global/USA/California already exists with the requested configuration", "response": {"site": {"area": {"name": "California", "parentName": "Global/USA"}}, "siteId": "9d963198-8ea0-4b1b-afe7-04401c9fd345", "type": "area"}}

response_3

dictionary

Error details when site creation, update, or deletion operations fail.

Contains error messages, execution IDs, and timestamps to assist with troubleshooting.

Returned: when a site operation fails

Sample: {"msg": "Failed to create site: Parent site does not exist", "response": {"bapiError": "Parent site Global/NonExistentArea does not exist", "bapiExecutionId": "3e8721a9-b56f-43c2-8d01-5d7b318f7e22", "bapiKey": "12345", "bapiName": "Sites", "endTime": "2025-07-25 14:33:15", "endTimeEpoch": 1658756595000, "runtimeInstanceId": "cisco-catc-01", "startTime": "2025-07-25 14:33:00", "startTimeEpoch": 1658756580000, "status": "FAILURE", "timeDuration": 15}}

response_4

list / elements=string

Empty response returned when attempting to delete a site that doesn’t exist.

Helps identify when deletion operations target non-existent sites.

Returned: when trying to delete a site that doesn’t exist

Sample: ["{\n   \"response\": []", "\n   \"msg\": \"Site Global/USA/California/NonExistentBuilding not found for deletion\"\n}\n"]

response_5

dictionary

Task status information for bulk site creation operations.

Includes progress indicators, operation IDs, and status details.

Returned: when bulk site creation is performed

Sample: "{\n    \"response\": {\n        \"startTime\": 1725427091204,\n        \"version\": 1725427091204,\n        \"progress\": \"{\\\"TOTAL\\\":3,\\\"VALIDATION_FAILURE_COUNT\\\":0,\\\"VALIDATION_SUCCESS_COUNT\\\":3,\\\n        \"VALIDATION_PENDING_COUNT\\\":0,\\\"CRAETION_SUCCESS_COUNT\\\":3,\\\"message\\\":\\\n        \"Group import completed successfully.\\\"}\",\n        \"serviceType\": \"Grouping Service\",\n        \"operationIdList\": [\n        \"3e7f1f73-b6f8-4ac6-b925-22e372e72510\"\n        ],\n        \"isError\": false,\n        \"instanceTenantId\": \"6663114d388b29001399e46a\",\n        \"id\": \"0191bb78-0704-767c-94c6-95a6e5a511d1\"\n    },\n    \"version\": \"1.0\",\n    \"msg\": \"Successfully created 3 sites in bulk operation\"\n}\n"

Authors

  • Madhan Sankaranarayanan (@madhansansel)

  • Rishita Chowdhary (@rishitachowdhary)

  • Abhishek Maheshwari (@abhishekmaheshwari)

  • Megha Kandari (@kandarimegha)

  • Sonali Deepthi Kesali (@skesali)