Bug 1444107

Summary: Embedded Ansible Service is not passing extra_vars overridden at runtime by user
Product: Red Hat CloudForms Management Engine Reporter: mkanoor
Component: ProvidersAssignee: Bill Wei <bilwei>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ansible:service
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1444222 (view as bug list) Environment:
Last Closed: 2018-03-06 14:33:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1444222    

Description mkanoor 2017-04-20 15:07:51 UTC
Description of problem:
Once a Ansible Playbook Service Dialog is built, it has default parameters, which can be overridden at "ordering" time. We are not honoring the parameters entered by the user at ordering time.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create an Ansible Playbook Service with extra vars
2. Order the Service and update one of the extra vars
3. When the playbook is executed in Embedded Ansible it should use the updated parameters.

Actual results:
Uses the original values

Expected results:
Should use the updated value

Additional info:
It seems this happens because of our mixing of symbols and strings. 
:extra_vars=>{:user=>"root", :pkg=>"httpd", :sleep=>"10", :host=>"localhost", "user"=>"root", "pkg"=>"abrt", "sleep"=>"97", "host"=>"localhost"}

Comment 3 CFME Bot 2017-04-20 20:46:20 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/228a0c6dbcef128d3762514ef52885b113f9eb0c

commit 228a0c6dbcef128d3762514ef52885b113f9eb0c
Author:     Bill Wei <bilwei>
AuthorDate: Thu Apr 20 11:50:12 2017 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Thu Apr 20 14:08:32 2017 -0400

    Use HashWithIndifferentAccess for job options
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1444107

 app/models/service_ansible_playbook.rb       | 2 +-
 spec/models/service_ansible_playbook_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 5 Dmitry Misharov 2017-11-01 10:41:27 UTC
Verified in 5.9.0.3.20171017182919_5f3a0ce. Parameters entered by the user at ordering time are used during a service provisioning.