Page
Configure job templates and use cases

Now that you've transitioned your Developer Sandbox instance into Ansible Automation Platform and customized your execution environment, this lesson will show you how to manage your credentials and templates.
In order to get full benefit from taking this lesson, you need:
- A Red Hat Developer account.
In this lesson, you will:
- Import playbooks.
- Build job templates.
- Configure use cases
Import ready-to-use playbooks
The first step to managing your sandbox is creating a project:
- In the Ansible Automation Platform sidebar, go to Automation Execution > Projects then click Create project.
- Fill out the following details:
- Name: aap-sandbox-project
- Organization: Default
- Execution environment: ee-sandbox
- Source control type: Git
- Source control URL: https://github.com/ansible-tmm/aap-sandbox-project.git
- Select Create project.
Create a machine credential
Now it's time to access the VM:
- In the Ansible Automation Platform sidebar, go to Automation Execution > Infrastructure then select the Credentials option.
- In the new screen, select Create credential.
Fill out the form with the following:
- Name: credential-ssh
- Credential Type: Machine
- Username: cloud-user
- Private key:
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn NhAAAAAwEAAQAAAYEAin4Y93nMvdumOSLBOjUKnpfSeu8S4974fm0c3qUh1siZcNNHKSQN VA94gY2c0znJril05a/8rVMqACh59rVmUJhj2+XA92wR5mIXfdP/hRRbu7sW6Az1Ml6ygS udwkOKIYhnCtC9OUJtvGth2Sg6ElzdbJQN898S8RnZt1/am6JKlIknOIYYtghfqLXA4VnF eA7kuTVLLlLKUzmCWGHfmcPfQs2BAnn8szUIoMcRDqqGrbIP4k7ZwwlHd0V599hE9C8n0u OuKWYExUp+t1nfrg6IM168LAQAAMd8lwWCxbQNwwFaceYjfgdTjtWLx8GwVEvFZO+74Rok qmMh2gNYP0ehPF08f+0iRO6JTAbQfe/cj6Z23IFkUUaCahLrFBWFMY9rT5D4bxtp2E1moP kb6lIWagZ8Zs9PFDmXNRobl/B1FbMHGNZ+gtmdKprbrvgym0ebYQqAcsBKrIYUJFDiGdN8 m8lnGS2dHD6vfGFEEYUuF/s7OeMzFH7fVQGI0iM/AAAFiL8bH9W/Gx/VAAAAB3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VAAAA wAW86ovtxI0obl3a4O2CO1/sn6sJiMEBEBnpAGDIi1Il9+gi6qi1m0uQUMjA1HdLUkncmV MTPyxImiD1w9XkeFBPYEOHRiip3kfncxwzU1i/axPsHX+9ZA1xIPFhzauHRH/T4W6N3+Ct 0uovjuELR+meTTHEB6vWD/h4WalB4f6XTzKawoqWtEgOy+S+xdOH126HIyznuFwA+hfq1l 7l3tfQFaLE85Ak7P4VjzoXlyq+mNlJbb1YlKp68zUel6pALgAAAMEAwVMW6XlfpcpXkPZ/ I6dkMfg4e9rV9JDsfe2uQWrNtHGz+RkSqt6OSqop3v/gwKwSGgDck5kD5Ru4dGvYwFyfCV Or9+u+a/GDB6qRz5r9XzjZTXu6Sg+7vXleScr37MfPCnmsRnzy0bf+rnnbYROgZUAMHv4f mAQx4l6YvlEc2nwxmr2Nd6DFlW8D3P4yBNP0RfCKtkAJHxiogzI9ct61GcFxV3ykiNJF4e 6+lE652XrKGK860/hXnCZ4T0e8KYVtAAAAwQC3ZD5pR8fqOfsUc+CGEjEB7os8MSFs/X9L QerMSipnKMuM7JXO7f5RQkqJyhbdyjR5XOEPxUf2mmVmJOZ3EPI6YGX8zMm280S24aK493 bZzdOFf89wI066a9nr6qCA/kevTkvPYEfXddua50N03OqxUhfmiiycx9USw75pXisub151 H9hRrPgfMHGqX2RBjdnIpLUpjzI/PrfLv+oKzg2BUbxEMDJ0gF8EJgRC99DheuXp7KWpWk 5c6Pp5pGUUm9sAAAASbGdhbGxlZ29AcmVkZmVkb3JhAQ==
Create a RHEL 9 VM in OpenShift Virtualization
Now we can create the VM:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click Create template then choose the Create job template.
- Fill out the following:
- Name: Create VM
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: ocp_vm_create.yml
- Execution environment: ee-sandbox
- Credentials: credential-ocp
- Select Create job template.
Delete a RHEL 9 VM in OpenShift Virtualization
Here's how to delete a RHEL VM:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click Create template then choose the Create job template.
- Fill out the following:
- Name: Delete VM
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: ocp_vm_create.yml
- Execution environment: ee-sandbox
- Credentials: credential-ocp
- Select Create job template.
Start the RHEL VM in OpenShift Virtualization
Now let’s add a job template to start the VM we created:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click the Create template button, and choose Create job template.
- Fill out the following:
- Name: Start VM
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: ocp_vm_create.yml
- Execution environment: ee-sandbox
- Credentials: credential-ocp
- Select Create job template.
Stop the RHEL VM in OpenShift Virtualization
Here's how to stop the VM we created:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click the Create template button, and choose Create job template.
- Fill out the following:
- Name: Stop VM
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: ocp_vm_create.yml
- Execution environment: ee-sandbox
- Credentials: credential-ocp
- Select Create job template.
Register the RHEL VM to Red Hat
Time to add a job template to register the RHEL VM to Red Hat:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click the Create template button, and choose Create job template.
- Fill out the following:
- Name: RHEL Register
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: rhel_register.yml
- Execution environment: ee-sandbox
- Credentials: credential-ssh
- Privilege escalation: Checked
- Select Create job template.
Configure time sync in the RHEL VM
Configure your template:
- In the Ansible Automation Platform sidebar, go to Automation Execution → Templates.
- Click the Create template button, and choose Create job template.
- Fill out the following:
- Name: RHEL Timesync
- Job type: Run
- Inventory: inventory-sandbox
- Project: aap-sandbox-project
- Playbook: rhel_timesync.yml
- Execution environment: ee-sandbox
- Credentials: credential-ssh
- Privilege escalation: Checked
- Select Create job template.
Summary
In this learning path, you started your Ansible Automation Platform journey by provisioning a Developer Sandbox instance and creating custom execution environments. Along the way, you've learned how to create credentials, inventories, projects, and templates that helped you create your Ansible Automation Platform sandbox.
Ready to learn more about how Ansible automates? Try these learning paths: