Bug 1452557 - Custom Button: None credential is always used during Ansible Playbook Service provisioning
Summary: Custom Button: None credential is always used during Ansible Playbook Service...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: GA
: 5.9.0
Assignee: Lucy Fu
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate:ansible:playbook:service:button
Depends On:
Blocks: 1460293
TreeView+ depends on / blocked
 
Reported: 2017-05-19 08:07 UTC by Dmitry Misharov
Modified: 2021-06-10 12:20 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1460293 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:34:35 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of the bug (77.53 KB, image/png)
2017-05-19 08:07 UTC, Dmitry Misharov
no flags Details

Description Dmitry Misharov 2017-05-19 08:07:09 UTC
Created attachment 1280332 [details]
Screenshot of the bug

Description of problem:
None credential is always used when Ansible Playbook Service was ordered via button.

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

How reproducible:
Always

Steps to Reproduce:
1. Enable Embedded Ansible role.
2. Wait until it will be enabled.
3. Add some repository with ansible playbook.
4. Add some ansible credentials.
5. Navigate to Services/Catalogs/Catalog Items.
6. Create ansible catalog item.
7. Navigate to Automation/Automate/Customization/Buttons.
8. Create a "VM and Instance" Custom Button pointing to an Ansible Playbook Service Dialog.
9. In the Object Details Section set the System/Process/Request set request to Order_Ansible_Playbook.
10. In the Attribute/Value Pairs section for the button set the "service_template_name" to Catalog Item name which was created in step 6. For the "host" set "vmdb_object".
11. Navigate to some VM and press the button.
12. In the service dialog pick credential for that VM.

Actual results:
Service was not provisioned because of incorrect credential.

Expected results:
Proper credential should be used when Ansible Playbook Service was ordered via button.

Comment 3 Greg McCullough 2017-05-19 14:34:04 UTC
Lucy - Madhu recently added this support.  See PR description https://github.com/ManageIQ/manageiq-content/pull/113.

We are thinking it is not passing the credential args.  The method would have to be changed to pick up the credentials and pass it using the dialog_options to the method.

Madhu suggested: We might want to just check with Bill to ask if he needs param_credentials or just credentials.

Comment 5 CFME Bot 2017-05-22 20:08:20 UTC
New commit detected on ManageIQ/manageiq-content/master:
https://github.com/ManageIQ/manageiq-content/commit/bb7af8bb61df7285951f35938fc979e9ed36f32a

commit bb7af8bb61df7285951f35938fc979e9ed36f32a
Author:     Lucy Fu <lufu>
AuthorDate: Mon May 22 14:01:14 2017 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Mon May 22 14:08:37 2017 -0400

    OrderAnsiblePlaybook method should collect machine credential.
    
    OrderAnsiblePlaybook method should collect machine credential
    and pass it to ServiceTemplae's provision_request.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1452557

 .../__methods__/order_ansible_playbook.rb          |  9 ++++-
 .../__methods__/order_ansible_playbook_spec.rb     | 47 +++++++++++++++++++++-
 2 files changed, 53 insertions(+), 3 deletions(-)

Comment 7 Dmitry Misharov 2017-10-18 08:52:57 UTC
Verified in 5.9.0.2.20171010190026_0413a06. Credentials are successfully used which user defines in service dialog dropdown.


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