cnos_factory – Reset the switch startup configuration to default (factory) on devices running Lenovo CNOS¶
Synopsis¶
This module allows you to reset a switch’s startup configuration. The method provides a way to reset the startup configuration to its factory settings. This is helpful when you want to move the switch to another topology as a new network device. This module uses SSH to manage network device configuration. The result of the operation can be viewed in results directory.
Parameters¶
Notes¶
Note
For more information on using Ansible to manage Lenovo Network devices see https://www.ansible.com/ansible-lenovo.
Examples¶
Tasks : The following are examples of using the module cnos_reload. These are
written in the main.yml file of the tasks directory.
---
- name: Test Reset to factory
cnos_factory:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_factory_{{ inventory_hostname }}_output.txt"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
msg
string
|
always |
Success or failure message
Sample:
Switch Startup Config is Reset to factory settings
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Anil Kumar Muraleedharan (@amuraleedhar)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.