First i would really thank @jmarc for the help and i recommend his Redhat Cloudforms Blog post :
You can find some very useful tips (this use case and more are coming )
So here the quick step by step "how to" for this particular use case (see my previous post):
(Assuming on Ansible Tower, you created your playbook and make it as a job template) :
- create the VM deployment Item :
No dialog and the Provisioning entry point is
(*jeremie is just my "cloned namespace")
This item is a VM deployement from a template for VMware provider so configure it the proper way (if you are interested let me know i update the thread with some screenshot for that)
Second item is the Ansible job (when you create the Service catalog item, choose "Ansible tower" type):
No dialog and the Provision entry point is /ConfigurationManagement/AnsibleTower/Service/Provisioning/StateMachines/Provision/ Provision_from_bundle
Now before we create the Service Bundle Items we gonna create the Service dialog for this one:
For that create/clone a namespace and add a new method :
This method (Get_VM_Name) will be able to dynamically feed the "limit" parameter of Ansible we gonna put in textbox on our Service Dialog.
Here the code :
Ok now create the service Dialog =>
(really basic...you can do much better )
The dialog box that is important here is the "Limit" one.
As i say previously this box will feed the limit parameter of Ansible to run on this specific host/VM.
Configure it the same way and point your Entry point to the method created before(Get_VM_Name)
Now create the Catalog bundle items :
Choose the dialog previously created and put the Provision entry point : /Service/Provisioning/StateMachines/ServiceProvision_Template/ CatalogbundleItemInitialization
Select you items and the sequencing (Ansible job in 2nd ):
The Ansible Job Template can only run once the VM is deployed and UP.
To ensure the ordering, add an initial ‘pre0’ state with a value of /Service/Provisioning/StateMachines/Methods/GroupSequenceCheck to the state machine schema used to launch our AnsibleType service item ==>
( See @bdunne with that particular step added, my last Workflow can work, not efficient but well...now i switched to the "limit" textbox way )
That's all Folks
Now you can Deploy a VMWare VM and configure it with ansible to fit the needs (and with Ansible, the possibility are endless)