[Satellite 6]Running ansible job on multiple hosts succeeds while on single host fails

Solution Verified - Updated -

Issue

A non load-balanced Ansible job chooses first capsule in the list when no capsule is selected for remote execution within a subnet of the target host in Satellite. The Ansible job gets executed over capsule:

Ansible job fails on:

   1:
PLAY [all] *********************************************************************
   2:
   3:
TASK [Gathering Facts] *********************************************************
   4:
fatal: [ansible.host.test]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Could not create directory '/usr/share/foreman-proxy/.ssh'.\r\nFailed to add the host to the list of known hosts (/usr/share/foreman-proxy/.ssh/known_hosts).\r\nno such identity: /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy: No such file or directory\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}
   5:
to retry, use: --limit @/tmp/foreman-playbook-5b88b4ed-5857-49e1-bdbc-d47c8a1fb411.retry
   6:
   7:
PLAY RECAP *********************************************************************
   8:
ansible.host.test : ok=0 changed=0 unreachable=1 failed=0
   9:
Exit status: 4

Environment

  • Satellite 6.5
  • Satellite Capsule
  • Ansible

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content