Ansible tasks failed with unreachable error randomly

Solution Verified - Updated -

Issue

  • Ansible tasks sometimes failed with any of the following errors
UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname example.host.com: Name or service not known", "unreachable": true}
msg: ''

UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host example.host.com port 22: Connection timed out", "unreachable": true}

UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host example.host.com port 22: Connection refused", "unreachable": true}

Environment

Satellite 6.6 and newer

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