cisco.dnac.site_intent module – Resource module for Site operations
Note
This module is part of the cisco.dnac collection (version 6.6.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_intent.
New in version 6.6.0: of cisco.dnac
Synopsis
Manage operation create, update and delete of the resource Sites.
Creates site with area/building/floor with specified hierarchy.
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.5
Parameters
Parameter |
Comments |
|---|---|
List of details of site being managed. |
|
Site Details. |
|
Site Create’s area. |
|
Name of the area (eg Area1). |
|
Parent name of the area to be created. |
|
Building Details. |
|
Address of the building to be created. |
|
Latitude coordinate of the building (eg 37.338). |
|
Longitude coordinate of the building (eg -121.832). |
|
Name of the building (eg building1). |
|
Parent name of building to be created. |
|
Site Create’s floor. |
|
Height of the floor (eg 15). |
|
Length of the floor (eg 100). |
|
Name of the floor (eg floor-1). |
|
Parent name of the floor to be created. |
|
Type of floor. Allowed values are ‘Cubes And Walled Offices’, ‘Drywall Office Only’, ‘Indoor High Ceiling’, ‘Outdoor Open Space’. |
|
Width of the floor (eg 100). |
|
Type of site to create/update/delete (eg area, building, floor). |
|
Flag for Cisco DNA Center SDK to enable debugging. Choices:
|
|
The Cisco DNA Center hostname. |
|
Flag for logging playbook execution details. If set to true the log file will be created at the location of the execution with the name dnac.log Choices:
|
|
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” |
|
The state of DNAC after module completion. Choices:
|
|
Flag for Cisco DNA 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
Paths used are post /dna/intent/api/v1/site, put dna/intent/api/v1/site/{siteId}, delete dna/intent/api/v1/site/{siteId}
Does not support
check_modeThe 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 a new building site
cisco.dnac.site_intent:
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: "{{dnac_log}}"
config:
site:
building:
address: string
latitude: 0
longitude: 0
name: string
parentName: string
type: string
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 DNAC Python SDK Returned: always Sample: “{\n \”response\”:\n {\n \”bapiExecutionId\”: String,\n \”bapiKey\”: String,\n \”bapiName\”: String,\n \”endTime\”: String,\n \”endTimeEpoch\”: 0,\n \”runtimeInstanceId\”: String,\n \”startTime\”: String,\n \”startTimeEpoch\”: 0,\n \”status\”: String,\n \”timeDuration\”: 0\n\n }\n \”msg\”: \”string\”\n}\n” |
|
A dictionary with existing site details. Returned: always Sample: “{\n \”response\”: {},\n \”msg\”: String\n}\n” |
|
A dictionary with API execution details as returned by the Cisco DNAC Python SDK Returned: always Sample: “{\n \”response\”:\n {\n \”bapiError\”: String,\n \”bapiExecutionId\”: String,\n \”bapiKey\”: String,\n \”bapiName\”: String,\n \”endTime\”: String,\n \”endTimeEpoch\”: 0,\n \”runtimeInstanceId\”: String,\n \”startTime\”: String,\n \”startTimeEpoch\”: 0,\n \”status\”: String,\n \”timeDuration\”: 0\n\n }\n \”msg\”: \”string\”\n}\n” |
|
A list with the response returned by the Cisco DNAC Python Returned: always Sample: [“{\n \”response\”: []”, “\n \”msg\”: String\n}\n”] |