SSH Not working with Playbook
thatnerdnoah opened this issue · comments
I am getting the following error when running the playbook.
PLAY [Configure Internet Pi.] **************************************************
TASK [Gathering Facts] *********************************************************
fatal: [10.19.5.89]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: pi@10.19.5.89: Permission denied (publickey,password).", "unreachable": true}
PLAY RECAP *********************************************************************
10.19.5.89 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
I am able to SSH into it normally, but it doesn't connect when running the playbook.
Any ideas?
I'm new to this repo, but do you need password when you "ssh pi@10.19.5.89" or have you generated a ssh-key for ansible and add it to server 10.19.5.89? If you need password that could be the problem
if you use password to ssh, you can run with ansible-playbook main.yml -kK
Thank you @fijar-lazuardy , that's what was required, although the full command seems to be
ansible-playbook main.yml -kK
insert minor spelling mistake gif
my bad
The -kK argument worked for me. Thanks everyone!