All playbooks on this page are sourced from the orka-engine-orchestration repository. The management UI is the recommended interface for day-to-day playbook execution. It provides a browser-based dashboard with pre-configured task templates for every playbook listed here. The CLI is available for advanced workflows and troubleshooting. See Getting Started: MSDC-Hosted or Getting Started: Self-Hosted for management UI setup instructions.
-
Inventory defines which hosts to target (for example, 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 a VM by Name
-
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
create_image.yml is the primary way to build a golden image for your VDI fleet. It deploys a temporary VM from a base image, runs your configuration scripts, commits the result to your OCI registry with a version tag, then deletes the temporary VM. The resulting image is the source for all VM deployments. See Golden image lifecycle for the full build-to-deploy loop.
-
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 pre-pulls an image to all hosts in your inventory so VMs deploy immediately without waiting for a registry download. Run this after create_image.yml and before deploying VMs in production.
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
Provision User to VM
Provisions a new admin user account on a running VM. The playbook connects to the VM via the Mac host as a jump proxy, sosshpass must be installed on the Ansible runner. Apple Command Line Tools will be installed on the VM automatically if not already present.
Install Citrix VDA
Installs Citrix Virtual Delivery Agent on a running VM. The playbook locates the VM across all hosts, installs prerequisites (.NET runtime, developer tools), sets the VM hostname, downloads and installs the Citrix VDA package, grants required TCC permissions, then reboots the VM to complete installation.sshpass must be installed on the Ansible runner. We recommend hosting your Citrix VDA installer in an S3 bucket with a presigned URL.
vm_name: the exact name of the running VM (also used as the VM hostname)citrix_installer_url: download URL for the Citrix VDA.dmghostname_suffix: domain suffix appended tovm_nameto form the full hostname (for example,corp.example.com). Leave blank to use the VM name as the hostname.
Register Citrix VDA
Registers an installed Citrix VDA with a Delivery Controller using an enrollment token. Run this afterinstall_citrix_vda.yml has completed successfully.
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 VM deployment
Deploy a test VM using
deploy.yml and confirm it appears in the output of list.yml.Test VDA registration
Run
install_citrix_vda.yml and register_citrix_vda.yml against the test VM, then confirm the VDA registers in Citrix Cloud.Test VM lifecycle
Start, stop, and restart the test VM to confirm lifecycle operations complete without errors.
Test image creation
Run
create_image.yml to produce a golden image and confirm it appears in your OCI registry.Test VM recreation
Delete the test VM and redeploy from the golden image to confirm the recreation path works.
Test VM deletion
Delete the test VM using
delete.yml and confirm it is removed from list.yml output.Test end-to-end user sessions
Launch a Citrix session to the new VM and confirm a user can connect successfully.

