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 1882123 - Install Roles from Galaxy' does not honor the location input
Summary: Install Roles from Galaxy' does not honor the location input
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.7.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: 6.10.0
Assignee: Ondřej Ezr
QA Contact: Danny Synk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-23 20:23 UTC by Joshua John Arthur Swanson
Modified: 2021-11-16 14:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:09:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31488 0 Normal Closed Install Roles from Galaxy' does not honor the location input 2021-01-14 13:15:02 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:09:35 UTC

Description Joshua John Arthur Swanson 2020-09-23 20:23:44 UTC
Description of problem:
The included REX Job called 'Install Roles from Galaxy' does not honor the location input.

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

How reproducible:
Always


Steps to Reproduce:
1. Select the remote execution job
2. Enter a role on galaxy and a location on the filesystem
3. Run the job

Actual results:
Satellite always pulls the role down to /root/.ansible


Expected results:
Satellite should deploy to the desired location specified in the job input. As of today the job seems to just ignore the 'location' input.


Additional info:


Example job run with /etc/ansible roles entered as 'location' and linux-system-roles.timesync as the ansible_roles_list:
1:

   2:
PLAY [all] *********************************************************************
   3:

   4:
TASK [Gathering Facts] *********************************************************
   5:
ok: [satellite02.lab.msp.redhat.com]
   6:

   7:
TASK [command] *****************************************************************
   8:
changed: [satellite02.lab.msp.redhat.com] => (item=linux-system-roles.timesync)
   9:

  10:
TASK [debug] *******************************************************************
  11:
ok: [satellite02.lab.msp.redhat.com] => {
  12:
    "out": {
  13:
        "changed": true, 
  14:
        "msg": "All items completed", 
  15:
        "results": [
  16:
            {
  17:
                "ansible_loop_var": "item", 
  18:
                "changed": true, 
  19:
                "cmd": [
  20:
                    "ansible-galaxy", 
  21:
                    "install", 
  22:
                    "linux-system-roles.timesync"
  23:
                ], 
  24:
                "delta": "0:00:04.084358", 
  25:
                "end": "2020-09-23 20:15:01.980798", 
  26:
                "failed": false, 
  27:
                "invocation": {
  28:
                    "module_args": {
  29:
                        "_raw_params": "ansible-galaxy install linux-system-roles.timesync", 
  30:
                        "_uses_shell": false, 
  31:
                        "argv": null, 
  32:
                        "chdir": null, 
  33:
                        "creates": null, 
  34:
                        "executable": null, 
  35:
                        "removes": null, 
  36:
                        "stdin": null, 
  37:
                        "stdin_add_newline": true, 
  38:
                        "strip_empty_ends": true, 
  39:
                        "warn": true
  40:
                    }
  41:
                }, 
  42:
                "item": "linux-system-roles.timesync", 
  43:
                "rc": 0, 
  44:
                "start": "2020-09-23 20:14:57.896440", 
  45:
                "stderr": "", 
  46:
                "stderr_lines": [], 
  47:
                "stdout": "- downloading role 'timesync', owned by linux-system-roles\n- downloading role from https://github.com/linux-system-roles/timesync/archive/1.1.0.tar.gz\n- extracting linux-system-roles.timesync to /root/.ansible/roles/linux-system-roles.timesync\n- linux-system-roles.timesync (1.1.0) was installed successfully", 
  48:
                "stdout_lines": [
  49:
                    "- downloading role 'timesync', owned by linux-system-roles", 
  50:
                    "- downloading role from https://github.com/linux-system-roles/timesync/archive/1.1.0.tar.gz", 
  51:
                    "- extracting linux-system-roles.timesync to /root/.ansible/roles/linux-system-roles.timesync", 
  52:
                    "- linux-system-roles.timesync (1.1.0) was installed successfully"
  53:
                ]
  54:
            }
  55:
        ]
  56:
    }
  57:
}
  58:
PLAY RECAP *********************************************************************
  59:
satellite02.lab.msp.redhat.com : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
  60:
Exit status: 0

Comment 1 Marek Hulan 2020-09-25 15:22:41 UTC
There is a workaround of using SSH provider or ansible provider job to run arbitrary command, the command being ansible-galaxy command directly

Comment 2 Ondřej Ezr 2020-12-10 10:40:26 UTC
Created redmine issue https://projects.theforeman.org/issues/31488 from this bug

Comment 3 Bryan Kearney 2020-12-10 12:05:33 UTC
Upstream bug assigned to oezr

Comment 4 Bryan Kearney 2020-12-10 12:05:38 UTC
Upstream bug assigned to oezr

Comment 5 Bryan Kearney 2021-01-04 16:10:43 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31488 has been resolved.

Comment 6 Danny Synk 2021-06-21 20:48:53 UTC
Steps to test:

1. Register a host to Satellite 6.10 and configure it for remote execution using the Global Registration Template.
2. Install the "ansible" package on the host.
3. In the Satellite webUI, navigate to Hosts > All Hosts > [hostname] and click the "Schedule Remote Job" button.
4. On the "Job invocation" page, select the "Ansible Galaxy" Job Category and the "Ansible Roles - Install from Galaxy" Job Template.
5. Enter "redhatofficial.rhel7_stig" in the "ansible_roles_list" field.
6. Enter "/etc/ansible/roles" in the "location" field.
7. Click the "Submit" button.

Expected Results:

The job task complete successfully, and the role is present on the host at /etc/ansible/roles/redhatofficial.rhel7_stig.

Actual Results:

The job task complete successfully, and the role is present on the host at /etc/ansible/roles/redhatofficial.rhel7_stig.

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

Comment 9 errata-xmlrpc 2021-11-16 14:09:27 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


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