Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2164400 - [RFE] Add functionality in API (to match Hammer) to Add/Delete a single Ansible role to Hostgroup without defining every role.
Summary: [RFE] Add functionality in API (to match Hammer) to Add/Delete a single Ansib...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.9.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.14.0
Assignee: Oleh Fedorenko
QA Contact: Gaurav Talreja
Adam Lazik
URL:
Whiteboard:
Depends On: 2029402
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-25 13:34 UTC by mark yarborough
Modified: 2023-11-08 14:19 UTC (History)
16 users (show)

Fixed In Version: rubygem-foreman_ansible-12.0.3
Doc Type: Enhancement
Doc Text:
.New API endpoints have been introduced The following API endpoints have been added: api/v2/hosts/:id/ansible_roles/:ansible_role_id:: Send a GET request to add a single Ansible role to a host or send a DELETE request to remove a single Ansible role from a host. api/v2/hostgroups/:id/ansible_roles/:ansible_role_id:: Send a GET request to add a single Ansible role to a host group or send a DELETE request to remove a single Ansible role from a host group. api/v2/organizations/:organization_id/rh_cloud/missing_hosts:: Send a GET request to list hosts that are missing in Red Hat Cloud. api/v2/webhooks/:id/test:: Send a POST request to test-fire a webhook.
Clone Of: 2029402
Environment:
Last Closed: 2023-11-08 14:18:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36015 0 Normal New Add functionality in API (to match Hammer) to Add/Delete a single Ansible role to Hostgroup without defining every role.... 2023-01-27 14:13:53 UTC
Foreman Issue Tracker 36413 0 Normal Ready For Testing Add a single role doesn't follow REST specs 2023-05-18 14:03:32 UTC
Red Hat Issue Tracker SAT-15133 0 None None None 2023-01-25 13:37:09 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:19:08 UTC

Comment 2 Oleh Fedorenko 2023-01-27 14:13:52 UTC
Created redmine issue https://projects.theforeman.org/issues/36015 from this bug

Comment 3 Bryan Kearney 2023-01-27 16:03:39 UTC
Upstream bug assigned to ofedoren

Comment 4 Bryan Kearney 2023-01-27 16:03:41 UTC
Upstream bug assigned to ofedoren

Comment 6 Bryan Kearney 2023-05-08 16:04:04 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36015 has been resolved.

Comment 13 Gaurav Talreja 2023-05-31 19:32:14 UTC
Verified.

Tested on Satellite 6.14.0 Snap 1.0
Version: rubygem-foreman_ansible-12.0.3-1.el8sat.noarch

Steps:
1. Create a Host/HostGroup
2. Import/Sync ansible_roles, and assign a few roles to Host/HostGroup
3. For add and remove ansible_roles for the HostGroup endpoints run "PUT /api/hostgroups/:id/ansible_roles/:ansible_role_id" and "DELETE /api/hostgroups/:id/ansible_roles/:ansible_role_id",
And for add and remove ansible_roles to Host endpoints run "PUT /api/hosts/:id/ansible_roles/:ansible_role_id" and "DELETE /api/hosts/:id/ansible_roles/:ansible_role_id"

Observation:
Add and remove API endpoints works fine for adding and removing single ansible_role with :ansible_role_id to Host/HostGroup.

Comment 18 errata-xmlrpc 2023-11-08 14:18:13 UTC
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 (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


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