I am trying to run bundle installon a remote host that uses gem from a private repo. The task freezes because it stops accepting the host key, since I cannot manually accept the key on the remote host when I run the available downloadable book locally.
Task in the book book
- name: bundle install
command: bundle install chdir={{ deploy_directory }}
How to check or add a github connection through a key file present on the remote host.
I also tried to explicitly accept the key before installing the package by establishing a test connection to github via ssh.
- name: test connection to git
command: ssh -vvv git@github.co key_file=/home/ubuntu/.ssh/id_rsa accept_hostkey=yes
Now this command also freezes.
source
share