Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1352012 - Extra Vars not passed to Ansible Tower when using custom state machines in service catalog
Extra Vars not passed to Ansible Tower when using custom state machines in se...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.6.0
Unspecified Unspecified
high Severity medium
: GA
: 5.6.1
Assigned To: mkanoor
Pavol Kotvan
service
: ZStream
Depends On: 1348232
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-01 08:13 EDT by John Prause
Modified: 2016-08-19 15:30 EDT (History)
7 users (show)

See Also:
Fixed In Version: 5.6.1.2
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1348232
Environment:
Last Closed: 2016-08-18 13:54:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1634 normal SHIPPED_LIVE Important: CFME 5.6.1 security, bug fix, and enhancement update 2016-08-18 17:43:52 EDT

  None (edit)
Comment 4 Shveta 2016-08-08 13:48:56 EDT
Hi Madhu , 

Please provider more steps to verify this bug .
 What can i specify in Postprovision for Provisioning a Vmware Catalog item .

Thanks,
Shveta
Comment 5 mkanoor 2016-08-08 16:32:01 EDT
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
Comment 8 errata-xmlrpc 2016-08-18 13:54:02 EDT
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

Note You need to log in before you can comment on or make changes to this bug.