New to Kestra?
Use blueprints to kickstart your first workflows.
Clone a vCenter VM from a template, configure it with Ansible, register it in the ServiceNow CMDB, and notify Slack, orchestrated end to end by Kestra.
Replace your vRA or vRO catalog item with a single declarative Kestra flow that provisions a VMware vSphere virtual machine end to end. The blueprint clones a VM from a vCenter template, runs an Ansible playbook to configure the OS for the target environment, creates a CMDB record in ServiceNow, and posts a confirmation to Slack. Platform and infrastructure teams get one auditable execution that covers VM clone, configuration management, CMDB registration, and notification, with retries built in at the most fragile step.
clone_vm uses io.kestra.plugin.ee.vmware.vcenter.CloneVm to clone sourceVmName to targetVmName on the configured ESXi host and datastore, and powers it on.ansible_configure uses io.kestra.plugin.ansible.cli.AnsibleCLI to render an inventory.ini pointing at the new VM and run ansible-playbook against a playbook loaded from the ANSIBLE_PLAYBOOK secret, passing the chosen environment as extra vars. A constant retry (3 attempts, 2 minutes apart) absorbs the boot and SSH warm up window.servicenow_register uses io.kestra.plugin.servicenow.Post to insert a row into the cmdb_ci_vmware_instance table with the VM name, IP, environment, and the Kestra execution id for traceability.notify uses io.kestra.plugin.slack.notifications.SlackIncomingWebhook to post a success message including the source template, new VM name, and address.Common vCenter connection settings (server, username, password) are centralized in pluginDefaults for io.kestra.plugin.ee.vmware.
vCenter, Ansible, ServiceNow, and Slack each have their own UI and scheduler, but none of them can drive a cross tool sequence with a single execution history. Kestra ties the four steps together with declarative YAML, per task retries (see the constant retry on ansible_configure), full task level logs and lineage, and the option to trigger this flow from an event, an API call, a webhook, or a schedule, not just from the vCenter UI. When a step fails you see exactly where and why, and you can replay from that task.
ansible-playbook binary on PATH).cmdb_ci_vmware_instance.VMWARE_VCENTER_USERNAME: vCenter user with permission to clone VMs.VMWARE_VCENTER_PASSWORD: vCenter password.ANSIBLE_PLAYBOOK: path or content of the playbook to apply, loaded via read(secret(...)).SERVICENOW_DOMAIN: ServiceNow instance domain, for example mycorp.SERVICENOW_USER, SERVICENOW_PASSWORD: ServiceNow OAuth user credentials.SERVICENOW_CLIENT_ID, SERVICENOW_CLIENT_SECRET: ServiceNow OAuth client.SLACK_WEBHOOK: Slack Incoming Webhook URL.clone_vm (hostname, datastoreName) and in pluginDefaults (server) to match your vCenter inventory.inputs.source_vm_name to an existing template and inputs.vm_name to the new VM name.inputs.vm_address (the hostname or IP Ansible will use) and pick the environment.cmdb_ci_vmware_instance for another ServiceNow table, or chain a second Post to also open a change request.errors block.vm_name, source_vm_name, and environment.