Ansible Tutorial for Beginners [Backup Cisco Router]

Video is ready, Click Here to View ×

This video is taken from my Ansible for Network Engineers Course which you can find more details about here.

In this Ansible Tutorial for Beginners I will show you the basics of Ansible how to run your first playbook and backup the configuration file of a cisco router.

How to Install Ansible on Ubuntu –

Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment and network devices.

Ansible for Network Engineers – previously used for server automation Ansible is now heavily used to perform network automation with cisco and other network vendors.

It uses no agents and no additional custom security infrastructure, so it’s easy to deploy and most importantly it uses a very simple language

YAML, in the form of Ansible Playbooks allow you describe your automation jobs in a way that approaches plain English.

For more videos and articles on Networking automation check out my website.


Backup Cisco router blog post

Ansible Tutorial for Network Engineers – Cisco Router Configuration Backup

Video is ready, Click Here to View ×



  1. ERROR! Syntax Error while loading YAML.

    The error appears to have been in '/etc/ansible/playbook/sw9_backup.yml': line 3, column 1, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    – hosts: sw9
    gather_facts: true
    ^ here

    exception type: <class 'yaml.parser.ParserError'>
    exception: while parsing a block collection
    in "<unicode string>", line 2, column 1
    did not find expected '-' indicator
    in "<unicode string>", line 3, column 1

  2. I would suggest to use ssh keys instead of plain text password. Mostly Cisco switches do support.
    Secondly, you can append date and time at the end of backup file by using $(date +%F_%R). e.g filename.$(date +%F_%R)

Leave a Reply

Your email address will not be published. Required fields are marked *