Description of problem:
User with minimal rights to play Ansible on host is unable to do so:
Oops, we're sorry but something went wrong PG::NotNullViolation: ERROR: null value in column "targeting_id" violates not-null constraint DETAIL: Failing row contains (12, null, null, null, null, null, null, null, null, null, null, null, null). : INSERT INTO "job_invocations" DEFAULT VALUES RETURNING "id"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have Sat with some roles imported and host with role assigned
(I have used linuxhq.setup)
2. Create user (in correct org and loc - also I have configured default
"after login" org and loc)
3. Grant that user access roles "Ansible Roles Manager" and "Viewer"
4. Login as that user and make sure you can see your host in Hosts -> All hosts
5. Hosts -> All hosts -> <host> -> Run Ansible roles
Created attachment 1430696 [details]
Reproducible upstream, the error is ugly but it's caused by the fact user is missing other required permission. The minimal set of roles is missing "Remote execution user"
We should add another check for user having create_job_invocations in order to display the button (including the bulk action and play for host/hostgroup)
Created redmine issue https://projects.theforeman.org/issues/24207 from this bug
Upstream bug assigned to email@example.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24207 has been resolved.
VERIFIED on Sat6.4#13
Reproducer via comment #0 and the button "Run Ansible roles" is not available.
When we add "Remote execution user" permission (comment #3), all works fine.
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.