Create resources within the automation controller web UI so that you can launch job templates and workflow job templates.
Outcomes
Create automation controller source control and machine credentials.
Create an automation controller project and then create an inventory that uses files stored in the project.
Create automation controller job templates and workflow templates.
Launch jobs from the automation controller web UI.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available:
[student@workstation ~]$ lab start compreview-cr4
Specifications
You can log in to your automation controller at https://controller.lab.example.com as the admin user with redhat as the password.
Create a source control credential resource that automation controller can use to download files from the git.lab.example.com Git server.
Create the credential with the following settings:
| Field | Value |
|---|---|
GitLab Projects
| |
Default
| |
Source Control
| |
student
| |
Content of the /home/student/.ssh/gitlab_rsa file. |
Create a machine credential resource that automation controller can use to access the managed nodes in your environment. Create the credential with the following settings:
| Field | Value |
|---|---|
Managed Nodes
| |
Default
| |
Machine
| |
student
| |
Content of the /home/student/.ssh/lab_rsa file. |
Create a project resource so that automation controller can download files from the git@git.lab.example.com:student/compreview Git repository.
Create the project with the following settings:
| Field | Value |
|---|---|
Comprehensive Review
| |
Default
| |
Git
| |
git@git.lab.example.com:student/compreview
| |
main
| |
GitLab Projects
| |
Delete
| |
Allow Branch Override
|
Create an inventory resource that contains the same hosts and host groups that you used in the previous comprehensive review exercises. Create the inventory with the following settings:
| Field | Value |
|---|---|
Common Nodes
| |
Default
|
Add an inventory source to the Common Nodes inventory with the following settings:
| Field | Value |
|---|---|
Project Inventory
| |
Sourced from a Project
| |
Comprehensive Review
| |
inventory-controller.yaml
|
Although the inventory-controller.yaml file does not appear in the list, you can type the name of the file.
After typing the file name, press the Enter key rather than the Tab key.
After you synchronize the inventory source, you should see that the following hosts and host groups belong to the Common Nodes inventory.
| Host | Host group |
|---|---|
arista1.lab.example.com
|
eos
|
arista2.lab.example.com
|
eos
|
iosxe1.lab.example.com
|
ios
|
iosxe2.lab.example.com
|
ios
|
junos1.lab.example.com
|
junos
|
junos2.lab.example.com
|
junos
|
workstation.lab.example.com
| Ungrouped |
The Common Nodes inventory does not define the ansible_user and ansible_ssh_private_key_file variables.
Create a job template named Configure Interfaces that uses the config_interfaces.yml playbook to add interface descriptions.
Create the job template with the following settings:
| Field | Value |
|---|---|
Configure Interfaces
| |
Common Nodes
| |
Comprehensive Review
| |
config_interfaces.yml
| |
Managed Nodes
|
Create a job template named Deploy DNS, NTP, & Syslog that uses the deploy.yml playbook to add DNS, NTP, and Syslog servers.
Create the job template with the following settings:
| Field | Value |
|---|---|
Deploy DNS, NTP, & Syslog
| |
Common Nodes
| |
Comprehensive Review
| |
deploy.yml
| |
Managed Nodes
|
Create a job template named Create Backups that uses the net_backup.yml playbook to generate new backup files.
Create the job template with the following settings:
| Field | Value |
|---|---|
Create Backups
| |
Common Nodes
| |
Comprehensive Review
| |
net_backup.yml
| |
Managed Nodes
|
Create a workflow template named Configure & Back up that belongs to the Default organization and uses the Common Nodes inventory.
Configure the workflow to satisfy the following criteria:
Start the workflow by synchronizing the Comprehensive Review project.
Use Project Sync as the node alias.
If the Project Sync node succeeds, then synchronize the Project Inventory source.
Use Inventory Sync as the node alias.
If the Inventory Sync node succeeds, then run both the Configure Interfaces and Deploy DNS, NTP, & Syslog job templates.
If both the Configure Interfaces and Deploy DNS, NTP, & Syslog nodes succeed, then run the Create Backups job template.
The completed workflow template should appear as follows:
![]() |
Add a survey to the Configure & Back up workflow template that prompts for a location to store the backup files.
Create the survey question with the following settings:
| Field | Value |
|---|---|
Enter an absolute path to the backup directory:
| |
backup_store
| |
Text
| |
| (selected) | |
2
| |
100
| |
/backups
|
The net_backup.yml playbook (used by the Create Backups node) includes the net_backup role.
This role creates the directory defined by the value of the backup_store variable.
Launch the Configure & Back up workflow template.
Enter /compreview as the response to the survey question.
After the jobs launched by the Configure & Back up workflow template complete, verify that the /compreview directory exists and that the directory contains a configuration file for each of the Junos and IOS managed nodes.
From the automation controller web UI, create the GitLab Projects source control credential resource.
Configure the credential to use authentication information for the git.lab.example.com server.
Navigate to https://controller.lab.example.com and log in as admin using redhat as the password.
Navigate to → and click . If you do not see the menu, then click the main menu icon at the upper left of the page. Create the credential with the following settings:
| Field | Value |
|---|---|
GitLab Projects
| |
Default
| |
Source Control
| |
student
| |
Content of the /home/student/.ssh/gitlab_rsa file. |
If you choose to browse for the file, then right-click anywhere in the directory navigation and select .
With this option enabled you can see the .ssh directory in the /home/student directory.
Click .
Create the Managed Nodes machine credential such that it contains authentication information for the devices in the lab environment.
Navigate to → and click . Create the credential with the following settings and then click :
| Field | Value |
|---|---|
Managed Nodes
| |
Default
| |
Machine
| |
student
| |
Content of the /home/student/.ssh/lab_rsa file. |
Create the Comprehensive Review project resource and configure the project to pull files from the git@git.lab.example.com:student/compreview Git repository.
Navigate to → and click . Create the project with the following settings and then click :
| Field | Value |
|---|---|
Comprehensive Review
| |
Default
| |
Git
| |
git@git.lab.example.com:student/compreview
| |
main
| |
GitLab Projects
| |
Delete
| |
Allow Branch Override
|
After you click , automation controller immediately attempts to synchronize the project. Verify that the field updates to indicate that the project synchronization succeeded.
Create the Common Nodes inventory resource and add the Project Inventory source to the inventory.
Synchronize the inventory source and verify that the inventory contains the expected hosts and host groups.
Navigate to → and then click → . Create the inventory with the following settings:
| Field | Value |
|---|---|
Common Nodes
| |
Default
|
Click .
From the tab, click . Create the inventory source with the following settings:
| Field | Value |
|---|---|
Project Inventory
| |
Sourced from a Project
| |
Comprehensive Review
| |
inventory-controller.yaml
|
Although the inventory-controller.yaml file does not appear in the list, you can type the name of the file.
After typing the file name, press the Enter key rather than the Tab key.
Click .
Click to synchronize the inventory source. The field updates to indicate that the synchronization succeeded.
Click the tab and then click the tab.
The page for the inventory does not define the ansible_user and ansible_ssh_private_key_file variables.
If the Common Nodes inventory defines the ansible_user and ansible_ssh_private_key_file variables, then you entered the inventory.yaml file as the source.
Update the Project Inventory source so that it uses the inventory-controller.yaml file.
You might also need to update the variables defined for the Common Nodes inventory to remove the undesired variables.
From the page for the inventory, click the tab to display the imported hosts. Click the tab to display the imported groups. The inventory source imported the following hosts and host groups:
| Host | Host group |
|---|---|
arista1.lab.example.com
|
eos
|
arista2.lab.example.com
|
eos
|
iosxe1.lab.example.com
|
ios
|
iosxe2.lab.example.com
|
ios
|
junos1.lab.example.com
|
junos
|
junos2.lab.example.com
|
junos
|
workstation.lab.example.com
| Ungrouped |
Create a job template named Configure Interfaces that uses the config_interfaces.yml playbook to configure interface descriptions.
Navigate to → and then click → . Create the job template with the following settings and then click :
| Field | Value |
|---|---|
Configure Interfaces
| |
Common Nodes
| |
Comprehensive Review
| |
config_interfaces.yml
| |
Managed Nodes
|
Create a job template named Deploy DNS, NTP, & Syslog that uses the deploy.yml playbook to add DNS, NTP, and Syslog servers.
Navigate to → and then click → . Create the job template with the following settings and then click :
| Field | Value |
|---|---|
Deploy DNS, NTP, & Syslog
| |
Common Nodes
| |
Comprehensive Review
| |
deploy.yml
| |
Managed Nodes
|
Create a job template named Create Backups that uses the net_backup.yml playbook to generate new backup files.
Navigate to → and then click → . Create the job template with the following settings and then click :
| Field | Value |
|---|---|
Create Backups
| |
Common Nodes
| |
Comprehensive Review
| |
net_backup.yml
| |
Managed Nodes
|
Create a workflow template named Configure & Back up that belongs to the Default organization and uses the Common Nodes inventory.
Navigate to → and then click → . Create the workflow template with the following settings and then click :
| Field | Value |
|---|---|
Configure & Back up
| |
Default
| |
Common Nodes
|
Add a Project Sync node named Project Sync to synchronize the Comprehensive Review project.
In the visualizer, click .
On the page, select in the list.
Select the project.
Enter Project Sync in the field and then click .
Add an Inventory Source Sync node named Inventory Sync that synchronizes the Project Inventory source if the Project Sync node succeeds.
In the visualizer, hover over the node and click the icon to add a new node.
You might need to increase the display resolution on the workstation machine, decrease the web browser zoom, or both, to see the entire visualizer display screen.
If your mouse has a scroll wheel, then you can use the scroll wheel to zoom in and out of the visualizer.
On the page, select the condition and then click .
On the page, select in the list.
Select the source.
Enter Inventory Sync in the field and then click .
Add a Job Template node that launches the Configure Interfaces job template to configure interface descriptions if the Inventory Sync node succeeds.
In the visualizer, hover over the node and click the icon to add a new node.
On the page, select the condition and then click .
On the page, select the job template.
Click .
Add a Job Template node that launches the Deploy DNS, NTP, & Syslog job template to add DNS, NTP, and Syslog servers if the Inventory Sync node succeeds.
In the visualizer, hover over the node and then click the icon to add a new node.
On the page, select the condition and then click .
On the page, select the job template.
Click .
Add a job template node that launches the Create Backups job template to generate new backup files if both the Configure Interfaces and Deploy DNS, NTP, & Syslog nodes succeed.
In the visualizer, hover over the node and then click the icon to add a new node.
On the page, select the condition and then click .
On the page, select the job template.
Select from the menu and then click . This convergence setting indicates that all parent nodes that point to the node must match their defined conditions.
Notice that the icon for the node contains the word ALL to indicate the convergence setting.
Hover over the node and then click the icon.
Hover over the node. The visualizer displays a dashed line with an arrow pointing to the node. Click the node.
Click to accept the default condition.
Click again in the upper-right corner to save this workflow template.
After this step, the completed workflow template should appear as follows:
![]() |
Add a survey to the Config & Back up workflow template, which prompts for a location to store the backup files.
Navigate to → and click the link.
Click the tab and then click to begin. Create the survey question with the following settings:
| Field | Value |
|---|---|
Enter an absolute path to the backup directory:
| |
backup_store
| |
Text
| |
| (selected) | |
2
| |
100
| |
/backups
|
The net_backup.yml playbook (used by the Create Backups node) includes the net_backup role.
This role creates the directory defined by the value of the backup_store variable.
Click .
Enable the survey for the Config & Back up job template.
Click and verify that the label changes to .
Launch the Configure & Back up workflow template and observe the result.
Navigate to → .
Click the icon for the workflow template.
Enter /compreview as the response to the survey question and then click .
Click to launch the workflow template with /compreview as the value for the backup_store variable.
Monitor the workflow. All nodes in the workflow succeed.
Verify that the /compreview directory exists on the workstation machine and that the directory contains a backup file for each managed node in the ios and junos inventory host groups.
List the contents of the /compreview directory:
[student@workstation ~]$ ls -1 /compreview
iosxe1.lab.example.com.cfg
iosxe2.lab.example.com.cfg
junos1.lab.example.com.cfg
junos2.lab.example.com.cfg
(Optional) Inspect one or more of the backup files for changes made by the Configure Interfaces and the Deploy DNS, NTP, & Syslog job templates.
The Configure Interfaces job template added the Managed by Ansible description to some interfaces on the managed nodes.
The Deploy DNS, NTP, & Syslog job template added the following servers:
| Server type | Added servers |
|---|---|
172.25.250.220 and 172.25.240.220
| |
172.25.23.240 and 172.25.23.230
| |
192.168.10.10 and 192.168.11.10
|