In this exercise, we’re going to build a workflow that will fully deploy our edge devices. We want to perform several steps automatically when the devices boot and call home, so a workflow provides an ideal solution.
The basic idea of a workflow is to link multiple Job Templates together. They may or may not share inventory, playbooks or even permissions. The links can be conditional:
Workflows are not even limited to executing Job Templates, but can also include project or inventory updates.
This enables new applications for Ansible automation controller: different Job Templates can build upon each other.
A job template has been created by the provisioner with an example playbook that tests connectivity to devices. This job template can be found within the Resources > Templates page.
Click on the Test Device Connectivity
template, then select Edit at the bottom of the page. Click the mangnifying glass icon next to Credentials. In the Select Credentials box, ensure Selected Category is set to Machine, and then select the Device Credentials created earler in exercise 2.2. This will allow this job template to authenticate to your edge devices as they’re provisioned.
Click Save to apply the changes.
Navigate to the Resources > Templates page. Once here, click Add > Add workflow template. Fill in the form with the following information:
Parameter | Value |
---|---|
Name | Provision Edge Device |
Organization | (Your_Student_Organization) |
Inventory | Edge Systems |
Options |
|
Click Save
After saving the workflow, you’ll be presented with the workflow visualizer. Click the Start button to begin adding nodes.
We’re going to add three nodes to our workflow to begin with:
These nodes should be connected via an On-Success connection in the workflow.
The resulting workflow should appear similar to the depiction illustrated in the Finished Workflow portion of the Solutions section.
Once you’ve added the three nodes to the workflow, click the Save button in the top right corner.
Navigation
Previous Exercise | Next Exercise |