title: How to deploy code from local git repository to remote server using Ansible
body: <p>I am using Ansible 2.5. I need to do deploy code from local(controller) git repository to remote server. </p>
  
  <p>I was trying with a Ansible-playbook with git module that can only deploy code from local repository to another local path or remote repository to another remote path. Its based on hosts configuration.</p>
  
  <pre><code>- git:
      repo: /home/pi/Desktop/kk/Vue-Example/
      dest: /home/pi/Desktop/bb
  </code></pre>
  
  <p>Here <code>repo</code> will be local(controller-machine) git repository path
  and <code>dest</code> will be remote machine location.</p>