Workshop Exercise 3.2 - Deploying the Application via Ansible Controller

Table of Contents

Objective

In this exercise, we’ll sync our project in Ansible Controller, create a job template, and run our new playbook.

Step 1 - Syncing Our Project

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: Sync Button

After clicking the sync button, the WebUI will show the project syncing and then a success under the Status column.

Step 2 - Creating a Job Template

In the Controller WebUI. under Resources > Templates, select Add > Add job template and enter the following information:

Parameter Value
Name Deploy Application
Inventory Edge Devices
Project Device Edge Codebase
Execution Environment Device Edge Workshops Execution Environment
Playbook playbooks/deploy-app.yml
Credentials
  • ✓ Device Credentials
  • Remember to click Save.

    Step 3 - Running the Job Template

    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 job completes, review the output to make sure everything ran successfully. In addition, running podman ps on the CLI of the edge device should show more pods running:

    Podman PS

    Solutions

    Deploy Application job template:

    Deploy Application Job Template


    Navigation

    Previous Exercise Next Exercise

    Click here to return to the Workshop Homepage