-
Inventory defines which hosts to target (e.g., the
hostsgroup containing your physical Mac machines) - Tasks specify actions to perform (deploy VM, install software, configure settings)
- Variables customize behavior for different environments or use cases
- Handlers respond to changes (restart services after configuration updates)
Core Ansible Playbook Examples
VM Deploy
Delete a single VM
Delete multiple VMs matching a specific naming convention
-
Use
create_image.ymlto create versioned images - Store images in your OCI registry
- To restore: Deploy new VMs from the backed-up image version
- Deletes VM from Orka Engine
- Frees up resources on host
Create a VM Image
-
Place your configuration scripts (VDA install, etc.) in the
/scriptsdirectory - Scripts will be executed in alphabetical order
- Example scripts:
Cache a VM Image
pull_image.yml automatically caches the image on all hosts in the inventory.
Recreate a VM Image
This implementation doesn’t have a dedicated playbook. To refresh VMs with a new image:- Delete existing VM
- Create a new VM from specified image
Playbook customization for your environment
The Ansible playbook examples referenced throughout this document will require additional customization to match your infrastructure and organizational requirements. Environment-specific variables: Create agroup_vars/all.yml file with the following settings as an example:
Test Basic VM Lifecycle Operations
Before deploying to production, validate all playbook operations in a test environment.Test sequence:
- Test connectivity
- Test image operations
- Test VM deployment
- Test VDA registration
- Test VM lifecycle
- Test image creation
- Test VM recreation
- Test VM deletion
- Test end-to-end user sessions
- Use verbose output for troubleshooting:

