The Ansible playbook provided in the exhibit performs the following tasks:
Uses the ios_command module to issue the show conf command on the CISCO_ROUTER_01 device.
Registers the output of the command into the variable config.
Copies the content of config.stdout[0] (the first line of the command output) to a file in /etc/ansible/configs/.
This sequence of tasks effectively backs up the running configuration of the router by capturing the current configuration output and saving it to a file.
References:
Ansible ios_command Module
Ansible Playbook Basics
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit