Provision multiple VMs using a catalog item

Hi @pemcg,

Can you please help me as to how can I provision multiple VMs using a catalog item ?
I have a catalog Item that is say named as Cluster DB Server
Now that should have by default have 2 VMs and the internal cluster is configured post provisioning, but the post provisioning I have taken care using Anisble.
Right Now I am trying to create a method that will loop depending upon the number of VMs selected and running the state machine for that VM and re-running it for all the VMs that should be provisioned
Is there an easy way of handling the number of VMs inside a state machine ?



If you take a look at the section entitled " Automatically Setting the Ansible ‘limit’ variable in a Service Bundle" here it might give you an idea. This example loops through all of the VM provisioning tasks in a service provision and extracts the VM names that have been provisioned, so that they can be passed to a playbook. You should be able to use something similar to loop through all of the VMs in your service.

Hope this helps,