title: Ansible - establishing initial SSH connection
body: <p>I am trying to copy an SSH public key to a newly created VM:</p>
  
  <pre><code>- hosts: vm1
    remote_user: root
    tasks:
      - name: deploy ssh key to account
        authorized_key: user='root' key="{{lookup('file','/root/.ssh/id_rsa.pub')}}"
  </code></pre>
  
  <p>But getting error:</p>
  
  <blockquote>
    <p>fatal: [jenkins]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n", "unreachable": true}</p>
  </blockquote>
  
  <p>So to establish SSH I need first to establish SSH? </p>
  
  <p>How can I establish SSH for newly created KVM automatically, without manual key copy.</p>
  
  <p>(<code>host_key_checking = False</code> in <code>ancible.cfg</code>)</p>