Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1716307

Summary: Cannot import default installed ansible roles
Product: Red Hat Satellite Reporter: Sanket Jagtap <sjagtap>
Component: Ansible - Configuration ManagementAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bkearney, lpramuk, mhulan, oprazak, pcreech, sghai, zhunting
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-smart_proxy_ansible-3.0.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:51:05 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 Sanket Jagtap 2019-06-03 08:04:01 UTC
Description of problem:
Two ansible roles are installed by default with satellite install
1. ansiblerole-foreman_scap_client
2. ansiblerole-insights-client

These rpms even though installed and not imported as roles in Satellite 

Version-Release number of selected component (if applicable):
Satellite 6.6 Snap 5

How reproducible:
Always

Steps to Reproduce:
[o.o.o.o] run: yum install -y satellite
[o.o.o.o] out: 
[o.o.o.o] out: ================================================================================
[o.o.o.o] out:  Package                       Arch   Version          Repository          Size
[o.o.o.o] out: ================================================================================
[o.o.o.o] out: Installing:
[o.o.o.o] out:  ansiblerole-foreman_scap_client
[o.o.o.o] out:                                noarch 0.0.2-1.el7sat   satellite           22 k
[o.o.o.o] out:  ansiblerole-insights-client   noarch 1.6-2.el7sat     satellite           16 k

 rpm -ql ansiblerole-foreman_scap_client-0.0.2-1.el7sat.noarch
/usr/share/ansible/roles/theforeman.foreman_scap_client
/usr/share/ansible/roles/theforeman.foreman_scap_client/.flake8

 rpm -ql ansiblerole-insights-client 
/usr/share/ansible/roles/RedHatInsights.insights-client
/usr/share/ansible/roles/RedHatInsights.insights-client/.yamllint
/usr/share/ansible/roles/RedHatInsights.insights-client/LICENSE



Actual results:
Unable to import the roles in satellite 

Expected results:
Roles should be imported in satellite

Additional info:

Comment 2 Ondřej Pražák 2019-06-06 06:52:26 UTC
Created redmine issue http://projects.theforeman.org/issues/26970 from this bug

Comment 3 Lukas Pramuk 2019-06-10 08:07:52 UTC
*** Bug 1718571 has been marked as a duplicate of this bug. ***

Comment 4 Marek Hulan 2019-06-26 08:06:55 UTC
The fix is merged upstream but we need to test that such imported roles will be found when ansible is ran. Chances are, we need to add roles_path to our ansible.cfg as well, since Ansible looks to $playbook_dir/roles and /etc/ansible/roles only by default - https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-search-path.

Comment 5 Bryan Kearney 2019-06-26 10:02:19 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26970 has been resolved.

Comment 8 Ondřej Pražák 2019-06-28 11:13:02 UTC
Connecting redmine issue https://projects.theforeman.org/issues/27182 from this bug

Comment 9 Bryan Kearney 2019-06-28 12:02:21 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26970 has been resolved.

Comment 10 Lukas Pramuk 2019-07-02 14:21:25 UTC
VERIFIED.

@satellite-6.6.0-5.beta.el7sat.noarch
rubygem-smart_proxy_ansible-3.0.1-1.el7sat.noarch

by the following manual reproducer: 

1. Check the roles are present in /usr/share/ansible/roles
# ls /usr/share/ansible/roles
RedHatInsights.insights-client  theforeman.foreman_scap_client

2. Import roles
Navigate to Configure -> Ansible Roles and click "Import from <fqdn>" button

>>> roles in /usr/share/ansible/roles get imported as well

Comment 11 Bryan Kearney 2019-10-22 19:51:05 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, 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-2019:3172