Bug 1744931

Summary: [RFE] Import Ansible variables automatically while importing the Ansible Roles
Product: Red Hat Satellite Reporter: Mihir Lele <mlele>
Component: Ansible - Configuration ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Danny Synk <dsynk>
Severity: low Docs Contact:
Priority: low    
Version: 6.6.0CC: egolov, gpadholi, ktordeur, oprazak
Target Milestone: 6.10.0Keywords: FutureFeature
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_ansible-6.3.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:08:51 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 Mihir Lele 2019-08-23 09:37:39 UTC
Description of problem:

We are required to import both the Ansible roles and Ansible variables manually. It would be nice if the Ansible Variables get automatically pulled from the imported Ansible roles automatically. 

Version-Release number of selected component (if applicable): 6.6 beta

Comment 3 Ondřej Pražák 2019-11-18 15:13:07 UTC
Created redmine issue https://projects.theforeman.org/issues/28287 from this bug

Comment 4 Bryan Kearney 2021-01-19 14:39:15 UTC
Upstream bug assigned to mshira

Comment 5 Bryan Kearney 2021-01-19 14:39:17 UTC
Upstream bug assigned to mshira

Comment 6 Bryan Kearney 2021-02-17 08:05:11 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28287 has been resolved.

Comment 8 Danny Synk 2021-06-21 16:35:40 UTC
Steps to test:

1. Install the redhatofficial.rhel7_stig role on Satellite 6.10, snap 5 from Ansible Galaxy:

  # ansible-galaxy install redhatofficial.rhel7_stig
  - downloading role 'rhel7_stig', owned by redhatofficial
  - downloading role from https://github.com/RedHatOfficial/ansible-role-rhel7-stig/archive/0.1.52.tar.gz
  - extracting redhatofficial.rhel7_stig to /root/.ansible/roles/redhatofficial.rhel7_stig
  - redhatofficial.rhel7_stig (0.1.52) was installed successfully

2. Copy the role to /etc/ansible/roles:

  # cp -r /root/.ansible/roles/redhatofficial.rhel7_stig /etc/ansible/roles/

3. Log in to the webUI as the admin user.
4. Navigate to Configure > Roles.
5. Click the "Import from satellite.example.com" button.
6. Select the redhatofficial.rhel7_stig role, which shows "Add: 246" in the "Variables" column.
7. Click the "Submit" button.
8. After the import completes, navigate to Configure > Variables.

Expected Results:

246 variables appear in the "Ansible Variables" list.

Actual Results:

246 variables appear in the "Ansible Variables" list.

Verified on Satellite 6.10, snap 5 (tfm-rubygem-foreman_ansible-6.3.0-1.el7sat.noarch).

Comment 11 errata-xmlrpc 2021-11-16 14:08:51 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 (Moderate: Satellite 6.10 Release), 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-2021:4702