Ansible is RedHat automation tools that we can create a list of command to manipulate machine such as cisco switch.
I am using Ubuntu 20.04 and here is the list of command that we need, in order to practice in cisco devnet program.
sudo apt install ansible
ansible-galaxy collection install cisco.ios
ansible-galaxy collection install ansible.netcommon
ansible-galaxy collection install oracle.oci
ansible-galaxy collection install community.general
ansible-galaxy collection install theforeman.foreman
ansible-galaxy collection install ansible.utils
ansible-galaxy collection install community.windows
That’s enough to run the basic ansible command to backup the csr1kv.
Pay attention to the modules installation by ansible-galaxy. If not present it will result error like this
ERROR! couldn't resolve module/action 'ios_command'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/home/sugi/ansible-csr1000v/backup_cisco_router_playbook.yaml': line 7, column 5, but maybe elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: DISPLAYING THE RUNNING-CONFIG
^ here
The error that I didn’t understand. It is said about false syntax, but it is not.