cisco.dnac.site_workflow_manager module -- Resource module for Site operations
Note
This module is part of the cisco.dnac collection (version 6.24.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.site_workflow_manager
.
New in cisco.dnac 6.6.0
Synopsis
Manage operation create, bulk create, update and delete of the resource Sites.
Creates site with area/building/floor with specified hierarchy.
Create multiple sites (area, building, or floor) with specified hierarchies in bulk.
Updates site with area/building/floor with specified hierarchy.
Deletes site with area/building/floor with specified hierarchy.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk == 2.4.5
python >= 3.9
Parameters
Parameter |
Comments |
---|---|
It represents a list of details for creating/managing/deleting sites, including areas, buildings, and floors. |
|
Contains details about the site being managed including areas, buildings and floors. |
|
Configuration details for creating or managing an area within a site. |
|
Name of the area to be created or managed (e.g., "Area1"). |
|
The full name of the parent under which the area will be created/managed/deleted (e.g., "Global/USA"). |
|
Configuration details required for creating or managing a building within a site. |
|
Physical address of the building that is to be created or managed. |
|
|
|
|
|
Name of the building (e.g., "Building1"). |
|
Hierarchical parent path of the building, indicating its location within the site (e.g., "Global/USA/San Francisco"). |
|
Configuration details required for creating or managing a floor within a site. |
|
|
|
Height of the floor in feet (e.g., 15.23). |
|
Length of the floor in feet (e.g., 100.11). |
|
Name of the floor (e.g., "Floor-1"). |
|
|
|
|
|
The unit of measurement for floor dimensions, typically 'feet' or 'meters'. |
|
|
|
Width of the floor in feet (e.g., 100.22). |
|
Type of site to create/update/delete (eg area, building, floor). |
|
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 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 Method used are 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
Paths used are 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
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
- 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"
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"
type: floor
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary with API execution details as returned by the Cisco Catalyst Center Python SDK Returned: always |
|
A dictionary with existing site details. Returned: always |
|
A dictionary with API execution details as returned by the Cisco Catalyst Center Python SDK Returned: always |
|
A list with the response returned by the Cisco Catalyst Center Python Returned: always Sample: :ansible-rv-sample-value:`["{\\n \\"response\\": []", "\\n \\"msg\\": String\\n}\\n"]` |
|
A dictionary with API task details as returned by the Cisco Catalyst Center Python SDK Returned: always |