-On a Ubuntu i have installed ansible. I have a playbook that is working fine. It ssh on remote hosts and fetches some data.
-On the same Ubuntu, i installed Gitlab and configure the runner with docker executor. For a basic playbook it is working fine
-The issue: If i push the playbook (that requires ssh to hosts) i get the error above: failed to resolve hostname
I did some search and understand that the issue is not DNS (i test DNS is fine) but the ssh known_hosts. So did try this:
-sudo -u gitlab-runner -i and ssh to hosts list to fill in the known_hosts
-run the playsbook with ANSIBLE_HOST_KEY_CHECKING inside the ansible.cfg and in the cli
still no luck. Need help, not sure what i am missing? Any idea?
Thank you
===== here is the Gitlab details =====
redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
261redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
280 “msg”: “ssh connection failed: ssh connect failed: Failed to resolve hostname inventory_hostname (Temporary failure in name resolution)”
281}
282PLAY RECAP *********************************************************************
283
host1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0