Bug 1728612
Summary: | Include Ansible become_method or make it inherit from rex settings | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Kenny Tordeurs <ktordeur> |
Component: | Ansible - Configuration Management | Assignee: | Nagoor Shaik <nshaik> |
Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.5.0 | CC: | bkearney, dvoss, egolov, mcorr, mkalyat, mmccune, pcreech, spetrosi, trichard, zhunting |
Target Milestone: | 6.7.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | tfm-rubygem-foreman_ansible-3.0.8.1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-04-14 13:24: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
Kenny Tordeurs
2019-07-10 09:14:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26850 has been resolved. FailedQA.
@Satellite 6.6.0 Snap22
tfm-rubygem-foreman_ansible-3.0.7.1-1.el7sat.noarch
# find / -path *app/services/foreman_ansible/inventory_creator.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-3.0.7.1/app/services/foreman_ansible/inventory_creator.rb
# grep ansible_become_method /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-3.0.7.1/app/services/foreman_ansible/inventory_creator.rb
<empty>
>>> the fix is not present
looking over the v3.0.7 tag in foreman_ansible, I do not see the attached fix. It appears it did not make it into that release. VERIFIED. @satellite-6.7.0-5.beta.el7sat.noarch tfm-rubygem-foreman_ansible-4.0.3-1.el7sat.noarch by the following manual reproducer: 1. Run Ansible Command job with following command: ps -f $(ps -f $(ps -f $(ps -f $$ | awk 'NR>1{print $3}') | awk 'NR>1{print $3}') | awk 'NR>1{print $3}') 2. Check the output of the job "stdout_lines": [ "UID PID PPID C STIME TTY STAT TIME CMD", "root 23891 23876 1 13:09 pts/1 S+ 0:00 sudo -H -S -p [sudo via ansible, key=bjewyccppqwazaqhkapkmopxvnrnrdea] password: -u test /bin/sh -c echo BECOME-SUCCESS-bjewyccppqwazaqhkapkmopxvnrnrdea ; /usr/bin/python /var/tmp/ansible-tmp-1580407876.01-46452950106097/AnsiballZ_command.py" ] >>> by default "sudo" method is used 3. Change the method to "su" in the settings: Administer -> Settings -> Remote execution settings -> Effective User Method -> su 4. Run Ansible Command job with the same command: ps -f $(ps -f $(ps -f $(ps -f $$ | awk 'NR>1{print $3}') | awk 'NR>1{print $3}') | awk 'NR>1{print $3}') 5. Check the output of the job "stdout_lines": [ "UID PID PPID C STIME TTY STAT TIME CMD", "root 23579 23564 1 13:09 pts/1 S+ 0:00 su test -c /bin/sh -c 'echo BECOME-SUCCESS-rkdzercgvekzoxetgbxnyqwajzsgmxih ; /usr/bin/python /var/tmp/ansible-tmp-1580407930.12-1211950403156/AnsiballZ_command.py'" ] >>> "su" method is used as Ansible REX now inherits the setting from SSH REX 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-2020:1454 |