siamaksade / openshift-demos-ansible

Ansible Roles and Playbook for Deploying OpenShift Demos
9 stars 31 forks source link

Failed to connect to the host via ssh: Permission denied When running playbook #5

Open mandibuswell opened 6 years ago

mandibuswell commented 6 years ago

when running ansible-playbook playbooks/coolstore/msa-cicd-eap-min.yml -e "github_ref=stable-ocp-3.9"

I would get a permission denied TASK [openshift_common_facts : check if token file exists] ***** Saturday 14 July 2018 19:37:33 +1200 (0:00:00.031) 0:00:01.177 * fatal: [localhost]: UNREACHABLE! => { "changed": false, "unreachable": true }

MSG:

Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

My openshift is running locally so I did not think I needed to do anything, however I assumed it is because when doing ssh localhost a password is required. Looking at ansible docks i just forced it to ask me for the password by adding --ask-pass to the command.

I am sure this is because of my limited ansible knowledge but it might be helpful documented either FAQ or readme.

jeffhoek commented 5 years ago

https://github.com/openshift-labs/learn-katacoda/issues/428