Ansible collection for deploying and managing workloads on OpenShift Container-Native Virtualization (CNV) / OpenShift Virtualization.
This collection provides roles and modules for deploying virtual machine instances and workloads on OpenShift clusters with CNV/Virtualization enabled. It is designed to work with the AgnosticD deployment framework and Red Hat Demo Platform (RHDP).
Creates and manages virtual machine instances on CNV-enabled OpenShift clusters.
Features:
- Deploy VM instances from custom images
- Configure VM resources (CPU, memory, storage)
- Automatically create services for VM network access
- Generate routes for external access to VM services
- Support for multiple instances with dynamic naming
- Integration with sandbox namespaces
Key Variables:
cnv_instances: List of instance definitions to createopenshift_cnv_namespace: Target namespace for instancesopenshift_cnv_legacy_routes: Route naming strategyopenshift_cnv_route_remove_x_frame_options_header: Allow iframe embedding
Example Usage:
- name: Deploy CNV instances
hosts: localhost
roles:
- agnosticd.cnv_workloads.cnv_instances
vars:
cnv_instances:
- name: windows-vm
image: base-windows-ad-2022
memory: 16G
cores: 4
services:
- name: winrm
port: 5986
- name: rdp
port: 3389ansible-galaxy collection install git+https://github.com/agnosticd/cnv_workloads.gitcd ~/gpte/github/agnosticd/cnv_workloads
ansible-galaxy collection build
ansible-galaxy collection install agnosticd-cnv_workloads-*.tar.gz- Ansible 2.9+
- OpenShift cluster with CNV/Virtualization operator installed
- kubernetes.core collection
- Valid OpenShift credentials with permissions to create VMs
This collection works with:
agnosticd.core_workloads- Core AgnosticD workload roleskubernetes.core- Kubernetes/OpenShift resource management
GPL-3.0-or-later
AgnosticD Team - Red Hat GPTE
- GitHub: https://github.com/agnosticd
- Email: agnosticd@redhat.com
Contributions are welcome! Please submit issues and pull requests to the GitHub repository.
For issues and questions:
- GitHub Issues: https://github.com/agnosticd/cnv_workloads/issues
- AgnosticD Documentation: https://github.com/redhat-cop/agnosticd
- 1.0.0 (2026-02-26): Initial release
- cnv_instances role extracted from cloud_vm_workloads
- Support for VM instance creation, services, and routes