Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-23947

Ansible Remote Execution Is Not Honoring SSH User From Advanced Fields in Job Template

XMLWordPrintable

    • 0
    • False
    • Hide

      None

      Show
      None
    • False
    • CLOSED
    • Release Notes
    • 450
    • Hide
      .Ansible jobs use the *SSH User* field from *Advanced fields*

      Previously, the Ansible provider for remote execution ignored the *SSH User* field of the *Advanced fields* inputs from the job wizard.
      The `foreman_ansible` component has been fixed to use the value of *SSH User* as the Ansible user.
      As a result, the Ansible provider uses this value correctly.
      Show
      .Ansible jobs use the *SSH User* field from *Advanced fields* Previously, the Ansible provider for remote execution ignored the *SSH User* field of the *Advanced fields* inputs from the job wizard. The `foreman_ansible` component has been fixed to use the value of *SSH User* as the Ansible user. As a result, the Ansible provider uses this value correctly.
    • Bug Fix
    • Done
    • Rocket
    • Moderate
    • No

      Description of problem:

      When using Ansible based Remote Execution, the option to change the "SSH user" from the "Advanced fields" section of a job template is not being honored.

      This works as expected with regular ssh remote execution.

      Version-Release number of selected component (if applicable):
      Red Hat Satellite 6.14

      How reproducible:
      always

      Steps to Reproduce:
      1. Set ssh_user and effective_user to root from the "Administer => Settings", "Remote Execution" tab
      2. On the Hosts page, select a host, and run "Schedule Remote Job"
      3. Select job category "Ansible Playbook" and Job Template "Ansible Roles - Ansible Default"
      3. From the Advanced Fields, select "SSH User" to a non-root user (a user that exists on the client, and the foreman-proxy public key has been shared with)

      Actual results:

      From the /var/log/secure logs on the client, we see the ssh connection to the client is using the root user, and not the non-root user we selected in the Advanced Fields for "SSH User"

      Expected results:

      The "SSH user" selected in the Advanced Fields of the Job Template should be used.

      Additional info:

      WORKAROUND:

      If we set the "remote_execution_ssh_user" parameter on the host, it will be honored for Ansible REX. Or if we set the "remote_execution_ssh_user" on a hostgroup and assign it to the host, the parameter will be honored for Ansible REX.

      NOTE:

      The "Effective user" IS being honored from the "Advanced fields" in the job template. It is only the "SSH user" that is not being honoroed.

              jira-bugzilla-migration RH Bugzilla Integration
              rhn-support-myoder Michael Yoder
              Gaurav Talreja Gaurav Talreja
              Lena Ansorgová Lena Ansorgová
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: