Bug #36568
closedHostgroup API controller also returns roles assigned to hosts in a host group
Description
copied from BZ 2187967
API query
/api/hostgroups/HOSTGROUPID/ansible_roles
does provide different output that WebUI editing the same HostGroup in some cases. Esp. when there is a host is associated with the HG
How reproducible:
100%
Steps to Reproduce:
1. Have 2 Ansible Roles, one assigned to a HG, another to a Host
2. Assign the Host to the HostGroup
3. In WebUI, edit the HostGroup -> Ansible Roles tab
4. call /api/hostgroups/HOSTGROUPID/ansible_roles (i.e. "curl -s -u admin:password https://$(hostname -f)/api/hostgroups/1/ansible_roles")
Actual results:
3. shows just the one AG assigned to the HG
4. shows two AGs "assigned" to the HG: the right one and also the one assigned "just" to the Host
Expected results:
Align the results - I think API response should be corrected and should not output ARs assigned to Hosts (associated with the HG). Since those AGs are not (directly) associated with the HG.
Updated by The Foreman Bot almost 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_ansible/pull/648 added
Updated by The Foreman Bot over 1 year ago
- Fixed in Releases foreman_ansible-12.0.4 added
Updated by Alexey Masolov over 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_ansible|0f1b21203c67cb4769d9d1c8b256a2b3d0dcbebb.
Updated by Nofar Alfassi over 1 year ago
- Fixed in Releases foreman_ansible-12.0.5 added
- Fixed in Releases deleted (
foreman_ansible-12.0.4)