--- # Git Module Example
- hosts: apacheserver
user: ansible
sudo: yes
connection: ssh
gather_facts: no
tasks:
- name: Checking out a git repo on the remote server
git: repo=git://woody-xu3:/home/ansible/testrepo dest=/home/ansible/gitrepo-2/
register: vinfo
- debug: var=vinfo
Not work!!!
# Example checkout a github repo and use refspec to fetch all pull requests
- git: repo=https://github.com/ansible/ansible-examples.git dest=/src/ansible-examples
It's working!