Create a network banner automation job template
Basics Lab 4
Challenge 1, learn how to create a Network-Banner job template in Automation controller
Lab 4 - Learning about Ansible Automation Platform Surveys
Demonstrate the use of automation controller https://docs.ansible.com/automation-controller/latest/html/userguide/job_templates.html#surveys. Surveys set extra variables for the playbook similar to 'Prompt for Extra Variables', but in a user-friendly question and answer way. Surveys allow for validation of user input.
Survey
An Ansible Controller survey is a simple question-and-answer form that allows users to customize their job runs. Combine that with Controller’s role-based access control, and you can build simple, easy self-service for your users.
Use cases for surveys are numerous. An example might be if operations wanted to give developers a "push to stage" button they could run without advanced Ansible knowledge. When launched, this task could prompt for answers to questions such as, "What tag should we release?"
Many types of questions can be asked, including multiple-choice questions.
Create a Job Template first
-
Once a Job Template is created and saved the top menu will have a tab Survey
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 WebUI tab 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 any created 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-Banner
Job Type
Run
Inventory
Network Inventory
Project
Network Toolkit
Execution Environment
Default execution environment
Playbook
playbooks/network_banner.yml
Credential
Network Credential
-
Click the blue Create job template button to save your job template.