Create a backup automation job template
Learn how to create a backup job template in automation*
Lab 1 - Config Backup and Restore
-
This lab will walk you through using Automation controller to automate backup and restore the configuration of a Cisco CSR (cloud services router) running IOS-XE.
Lab Diagram
-
The lab diagram for this demonstration is very simple. There will be one Red Hat Enterprise Linux 8 device running automation controller. It is directly connected to the management network for a Cisco CSR (cloud services router) running IOS-XE.
Quick Automation Victories
-
We know that network backup and restores are fairly uninteresting in the grand scheme of things, but they are a very common and ubiquitous use-case that all network operators will need. This provides an easy turn key use-case for network engineers to start their automation journey.
Automation controller
-
Automation controller provides a standardized way to define, operate, and delegate Ansible automation across the enterprise. It includes a Web User Interface (WebUI) that we will be using for this challenge.
Job Templates
-
Everything in Automation controller revolves around the concept of a Job Template. Job Templates allow Ansible Playbooks to be controlled, delegated and scaled for an organization.
Job templates also encourage the reuse of Ansible Playbook content and collaboration between teams.
A Job Template requires:
-
An Inventory to run the job against
-
A Credential to login to devices.
-
A Project which contains Ansible Playbooks
-
Challenge 1 - Creating a backup Job Template
-
For this challenge exercise you are going to create a Job Template in Automation controller. We are going to use the Network Toolkit Collection (https://github.com/network-automation/toolkit) that contains multi-vendor playbooks for Backup, restore and more.
-
The credentials (username and password), inventory (a single Cisco router) and project (the network toolkit repository listed above) are already added. We simply need to tie them together into a simple re-usable Job Template for our organization to use.
Lets get started
That is the end of of your lab briefing!
For this exercise we are going to create an automation job on Automation controller
Login to automation controller
-
To login to automation controller select the
Automation controller WebUItab at the top of your screen.Login with the following credentials:
username
admin
password
ansible123!
Step 1 - Create an automation job
-
In the left navigation menu, expand Automation Execution and then click on Templates.
-
You will see a list of Job Templates. Job templates encourage the reuse of Ansible playbook content and collaboration between teams.
-
Click the blue Add button and select Create job template
-
Assign the following values
Name Value Name
Network Automation - Backup
Job Type
Run
Inventory
Network Inventory
Project
Network Toolkit
Execution Environment
Default execution environment
Playbook
playbooks/network_backup.yml
Credentials NOTE: there are two credentials
-
Network Credential
-
AAP controller credential
To find the AAP controller credentialchange the Selected Category toRed Hat Ansible Automation Platform -
-
Click the Create job template button to save your job template.