1
resposta

Erro na etapa ansible-playbook

Erro ao rodar o camando: ansible-playbook -i /vagrant/configs/ansible/hosts /vagrant/configs/ansible/playbook.yml

ERRO: Last login: Fri Oct 29 16:55:25 2021 from 10.0.2.2 vagrant@ubuntu-bionic:~$ ansible-playbook -i /vagrant/configs/ansible/hosts /vagrant/configs/ansible/playbook.yml

PLAY [all] * TASK [Gathering Facts] *fatal: [192.168.1.22]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '192.168.1.22' (ECDSA) to the list of known hosts.\r\nvagrant@192.168.1.22: Permission denied (publickey).", "unreachable": true}

PLAY RECAP *192.168.1.22 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0

1 resposta

A chave privada que voce esta usando provavelmente não esta na maquina, pode usar o comando ssh-copy-id vagrant@192.168.1.22 se a chave publica não estiver no local padrão use o parametro** -i caminho-da-chave.pub**