cisco.dnac.site_intent module – Resource module for Site operations
Note
This module is part of the cisco.dnac collection (version 6.8.2).
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 cisco.dnac 6.6.0
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).Values between -90 to +90. |
|
Longitude coordinate of the building (eg -121.832).Values between -180 to +180. |
|
Name of the building (eg building1). |
|
Parent name of building to be created. |
|
Site Create’s floor. |
|
Floor number in the building/site (eg 5). |
|
Height of the floor units is ft. (eg 15). |
|
Length of the floor units is ft. (eg 100). |
|
Name of the floor (eg floor-1). |
|
Complete Parent name of the floor to be created(eg Global/USA/San Francisco/BGL_18). |
|
Type of floor. Allowed values are ‘Cubes And Walled Offices’, ‘Drywall Office Only’, ‘Indoor High Ceiling’, ‘Outdoor Open Space’. |
|
Width of the floor units is ft. (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: :ansible-option-default:`"443"` |
|
The Cisco DNA Center username to authenticate. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Informs the SDK which version of Cisco DNA Center to use. Default: :ansible-option-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 |
|
A dictionary with existing site details. Returned: always |
|
A dictionary with API execution details as returned by the Cisco DNAC Python SDK Returned: always |
|
A list with the response returned by the Cisco DNAC Python Returned: always Sample: :ansible-rv-sample-value:`["{\\n \\"response\\": []", "\\n \\"msg\\": String\\n}\\n"]` |