Hi Madhu , Please provider more steps to verify this bug . What can i specify in Postprovision for Provisioning a Vmware Catalog item . Thanks, Shveta
Hi, For this use case the customer had a regular service dialog to provision a single vm, which is different from having an "Ansible type" service, which directly works with the Ansible Job Template. In their use case they would first provision the VM and then after provisioning run the Ansbile Job Template on the newly provisioned VM. The dialog was built to pick up Ansible vars from the end user. So for example if they created the following 2 parameters in the service dialog which are going to be used during post provisioning when we are running the Ansible Job Template. e.g. param_package_name = "http" param_package_ver = "3.1" These attributes are stored in the service options hash, and the earlier code wasn't looking at these fields. This fix was to look at the options hash and parse out the parameters and send it to Ansible Tower. In the above example the parameter is stored in the options hash as dialog_param_package_name dialog_param_package_ver When we send it to Ansible Tower it will go in as package_name package_ver The param will be removed When creating the dialog pleas make sure that any parameters they want to pass will be listed with param_ To test this feature you would have to update the post provision step in the Provisiong state machine to call the Ansible Tower State Machine, which is defined in ManageIQ/Infrastructure/Vm/Provisioning/StateMachines/VMProvision_Template. You can take the PostProvision state and point it to /ConfigurationManagement/AnsibleTower/Operations/StateMachines/Job/default During the post provision phase we will connect to Ansbile Tower and execute the Job Template. To test this you would have to create your owns Ansible Tower Job Template, and that template should take run tine params also called extra_vars in Ansible. To see if the Job has been executed properly you should check the Ansbile tower to see what parameters were passed in. Thanks, Madhu
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-1634.html