title: bundle install hang while installing private gem via ansible playbook
body: <p>I am trying to run <code>bundle install</code> on a remote host which uses gem from private repo. The task get hang because it stops to accept host key as I can't manually accept the key on the remote host as am running the ansible playbook locally. </p>
  
  <blockquote>
    <p>Playbook task</p>
  </blockquote>
  
  <pre><code>  - name: bundle install
      command: bundle install chdir={{ deploy_directory }}
  </code></pre>
  
  <p>How to test or add the github connection via the key file present on the remote host.</p>
  
  <p>I also tried to explicitly accept the key before bundle install by making a test connection to github via ssh.</p>
  
  <pre><code>  - name: test connection to git
      command: ssh -vvv git@github.co key_file=/home/ubuntu/.ssh/id_rsa accept_hostkey=yes
  </code></pre>
  
  <p>Now This command is also getting hang.</p>