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

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

XMLWordPrintable

    • 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.

          There are no Sub-Tasks for this issue.

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

                Created:
                Updated:
                Resolved: