cisco.dnac.device_configs_backup_workflow_manager module -- Resource module for device_configs_backup functions
Note
This module is part of the cisco.dnac collection (version 6.15.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.device_configs_backup_workflow_manager
.
New in cisco.dnac 6.14.0
Synopsis
Manage operation related to taking the backup of running config, static config and vlan.dat.bat
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk == 2.6.10
python >= 3.5
Parameters
Parameter |
Comments |
---|---|
List of details regarding the device configuration backups being taken Alteast one of the paramters mentioned in the suboptions must be passed in config |
|
Specifies the collection status of the device(s) on the GUI of Cisco Catalyst Center |
|
Family of the device(s) as displayed on the inventory GUI of Cisco Catalyst Center |
|
Optional file password for zipping and unzipping the config file. Minimum password length is 8 and it should contain atleast one lower case letter, one uppercase letter, one digit and one special characters from -=\\\\\\\\;,./~!@$%^&*()_+{}[]|:?" |
|
Location of the path or folder where the configs need to be exported in local system. If the file_path is not provided, the backup file(s) will be stored in a directory named "tmp" in the same directory as the playbook. Default: :ansible-option-default:`"tmp"` |
|
Hostname of the device as displayed on the inventory GUI of Cisco Catalyst Center |
|
Mac address of the device as displayed on the inventory GUI of Cisco Catalyst Center |
|
IP address of the device as displayed on the inventory GUI of Cisco Catalyst Center |
|
Serial number of the device as displayed on the inventory GUI of Cisco Catalyst Center |
|
Specifies the series of the device(s) from the type, like Cisco Catalyst 9300 Series Switches |
|
Specifies the type of the device(s) from the family, like Cisco Catalyst 9300 Switch or Cisco Catalyst 9500 Switch |
|
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 Cisco 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 Methods used are devices.Devices.get_device_list, configuration_archive.ConfigurationsArchive.export_device_configurations, task.Task.get_task_by_id
Paths used are get /dna/intent/api/v1/network-device post dna/intent/api/v1/network-device-archive/cleartext get /dna/intent/api/v1/task/${taskId}
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: Take backup of a 9300 wired device
cisco.dnac.device_configs_backup_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: "{{dnac_log_level}}"
state: merged
config:
- hostname: NY-BN-9500.cisco.local
management_ip_address: 205.1.1.4
serial_number: F2AKI0082J
family: Switches and Hubs
type: Cisco Catalyst 9300 Switch
series: Cisco Catalyst 9300 Series Switches
collection_status: Managed
file_path: /home/admin/madhan_ansible/collections/ansible_collections/cisco/dnac/playbooks/new_tmp
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary with with the response returned by the Cisco Catalyst Center Python SDK Returned: always |
|
A string with the response returned by the Cisco Catalyst Center Python SDK Returned: always Sample: :ansible-rv-sample-value:`["{\\n \\"response\\": []", "\\n \\"msg\\": String\\n}\\n"]` |