In this exercise, we’ll sync our project in Ansible Controller, create a job template, and run our new playbook.
Return to the Ansible Controller WebUI and navigate to Resources > Projects. Locate the project named Device Edge Codebase and click the Sync Project button on the right hand side of the page.
For reference, this is the sync button:
After clicking the sync button, the WebUI will show the project syncing and then a success under the Status column.
In the Controller WebUI. under Resources > Templates, select Add > Add job template and enter the following information:
Parameter | Value |
---|---|
Name | Deploy Application |
Inventory | Edge Systems |
Project | Device Edge Codebase |
Execution Environment | Device Edge Workshops Execution Environment |
Playbook | playbooks/deploy-app.yml |
Credentials |
Remember to click Save.
Now that the job template has been created, click the Launch button if you are still within the Deploy Application job template. Otherwise, click on the rocket ship on the Templates page to launch the job template. Monitor the output for any errors or issues. However, hopefully the job executes successfully.
As a reminder, the output of jobs can be reviewed on the Jobs tab.
Once the playbook completes, visit http://$(your-device-ip-address):1881/ui
to view the running application.
Note
To retrieve your device IP address, check the host vars in the Ansible Controller WebUI under the Hosts page.
Similar to the bare metal deployment of the application, the automation could be added to the end of our provisioning workflow as soon as a device calls home.
Deploy Application job template:
Application running:
Navigation
Previous Exercise Click here to return to the Workshop Homepage