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 1698178 - [RFE] Allow the use of Ansible Runner instead of Ansible
Summary: [RFE] Allow the use of Ansible Runner instead of Ansible
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.6.0
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1698179 (view as bug list)
Depends On: 1730344
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-09 18:11 UTC by Bryan Kearney
Modified: 2019-10-22 12:47 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-foreman_ansible-3.0.2, tfm-rubygem-foreman_remote_execution-1.7.1, tfm-rubygem-foreman_remote_execution_core-1.1.6, tfm-rubygem-foreman_ansible_core-3.0.0, ansible-runner-1.3.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 12:47:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3172 0 None None None 2019-10-22 12:47:28 UTC

Description Bryan Kearney 2019-04-09 18:11:35 UTC
[RFE] Allow the use of Ansible Runner instead of Ansible

Comment 3 Bryan Kearney 2019-05-20 15:26:17 UTC
*** Bug 1698179 has been marked as a duplicate of this bug. ***

Comment 14 Lukas Pramuk 2019-08-08 12:52:24 UTC
VERIFIED.

@Satellite-6.6.0 Snap14
tfm-rubygem-foreman_ansible-3.0.3-3.el7sat.noarch
tfm-rubygem-foreman_ansible_core-3.0.0-1.el7sat.noarch
ansible-runner-1.3.4-2.el7ar.noarch
ansible-2.8.3-1.el7ae.noarch

by the following testing procedure:

# curl -k https://$(hostname):9090/ssh/pubkey >> ~/.ssh/authorized_keys

# yum install ansible-runner
...

Installed:
  ansible-runner.noarch 0:1.3.4-2.el7ar                                                                                 

Dependency Installed:
  libwebp.x86_64 0:0.3.0-7.el7                            python-docutils.noarch 0:0.11-0.3.20130715svn7687.el7         
  python-pillow.x86_64 0:2.0.0-19.gitd1c6db8.el7          python-psutil.x86_64 0:5.0.1-3.el7sat                         
  python2-ansible-runner.noarch 0:1.3.4-2.el7ar           python2-daemon.noarch 0:2.1.2-7.el7at                         
  python2-lockfile.noarch 1:0.11.0-10.el7ar               python2-pexpect.noarch 0:4.6-1.el7at                          
  python2-ptyprocess.noarch 0:0.5.2-3.el7at              

# hammer settings set --name ansible_implementation --value ansible-runner
Setting [ansible_implementation] updated to [ansible-runner].

# hammer job-invocation create --job-template 'Run Command - Ansible Default' --inputs 'command=uname -a' --search-query "name ^ $(hostname)"
Job invocation 1 created
[...............................................................................................................] [100%]
1 task(s), 1 success, 0 fail

# hammer job-invocation output --id 1 --host $(hostname)


PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

ok: [<HOST_FQDN>]

TASK [shell] *******************************************************************

changed: [<HOST_FQDN>]

TASK [debug] *******************************************************************

ok: [<HOST_FQDN>] => {
    "out": {
        "changed": true, 
        "cmd": "uname -a\n", 
        "delta": "0:00:00.003244", 
        "end": "2019-08-08 08:22:07.402830", 
        "failed": false, 
        "rc": 0, 
        "start": "2019-08-08 08:22:07.399586", 
        "stderr": "", 
        "stderr_lines": [], 
        "stdout": "Linux <HOST_FQDN> 3.10.0-957.27.2.el7.x86_64 #1 SMP Tue Jul 9 16:53:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux", 
        "stdout_lines": [
            "Linux <HOST_FQDN> 3.10.0-957.27.2.el7.x86_64 #1 SMP Tue Jul 9 16:53:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux"
        ]
    }
}
PLAY RECAP *********************************************************************
<HOST_FQDN> : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
Exit status: 0

>>> REX using ansible-runner implementation works as expected

# hammer settings set --name ansible_implementation --value ansible-playbook
Setting [ansible_implementation] updated to [ansible-playbook].

# hammer job-invocation create --job-template 'Run Command - Ansible Default' --inputs 'command=uname -a' --search-query "name ^ $(hostname)"
Job invocation 2 created
[...............................................................................................................] [100%]
1 task(s), 1 success, 0 fail

>>> After switching back to ansible-playbook REX works as expected

Comment 16 errata-xmlrpc 2019-10-22 12:47:18 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


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