Bug 1646928

Summary: Host > Play Ansible Roles skips a step
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: aruzicka, inecas, pondrejk
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-14 13:26:04 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:

Description Peter Ondrejka 2018-11-06 10:39:04 UTC
Description of problem:

On host list page, select host and do Select Action > Play ansible role. Job immediately starts without letting you to select the job category, template, query, etc. You have to hit "rerun" on the job page to get to the d

Version-Release number of selected component (if applicable):
Satellite 6.5 snap 2 (will check 6.4 too)

How reproducible:
Always


Actual results:
Some default role is run

Expected results:
Possibility to select parameters of playbook run.

Additional info:
BTW, I'm not sure why the "Play ansible role" option is in the action is there when "Schedule remote job" does the same thing

Comment 1 Peter Ondrejka 2018-11-06 10:50:40 UTC
Happens also in 6.4

Comment 3 Adam Ruzicka 2018-11-06 11:28:54 UTC
I think the difference is that "Schedule remote job" takes you to the new job invocation form where you can specify what to run and "Play ansible roles" takes the list of roles assigned to the host and runs them immediately.

From upstream docs[1]:

> Alternatively, you can run the playbook for all Ansible roles applicable to hosts in a host group by clicking on the Play roles button on the Host groups page.

I'd say this works as expected.

[1] - https://theforeman.org/plugins/foreman_ansible/2.x/index.html#4.3RunningAnsibleRoles

Comment 4 Brad Buckingham 2018-11-06 18:12:41 UTC
Peter, should we close this based upon comment 5?

Comment 5 Ivan Necas 2018-11-14 13:26:04 UTC
I agree this is intentional behaviour. Feel free to re-open in disagreement.

Comment 6 Peter Ondrejka 2018-11-26 09:48:36 UTC
Ok, I understand now why the option exists, though it is hard to figure out what is happening without knowing that particular line in docs, even after running the play. An easy way to improve would be making the option name more informative, something like "Play all Ansible roles from hostgroup". Therefore filing this humble rfe here:  https://bugzilla.redhat.com/show_bug.cgi?id=1653217