Change example syntax on git module

This commit is contained in:
Sam Doran 2016-10-13 09:39:15 -04:00 committed by Matt Clay
parent 2bb5ab9776
commit 1c801ac574

View file

@ -194,22 +194,35 @@ notes:
EXAMPLES = ''' EXAMPLES = '''
# Example git checkout from Ansible Playbooks # Example git checkout from Ansible Playbooks
- git: repo=git://foosball.example.org/path/to/repo.git - git:
dest=/srv/checkout repo: 'git://foosball.example.org/path/to/repo.git'
version=release-0.22 dest: /srv/checkout
version: release-0.22
# Example read-write git checkout from github # Example read-write git checkout from github
- git: repo=ssh://git@github.com/mylogin/hello.git dest=/home/mylogin/hello - git:
repo: 'ssh://git@github.com/mylogin/hello.git'
dest: /home/mylogin/hello
# Example just ensuring the repo checkout exists # Example just ensuring the repo checkout exists
- git: repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout update=no - git:
repo: 'git://foosball.example.org/path/to/repo.git'
dest: /srv/checkout
update: no
# Example just get information about the repository whether or not it has # Example just get information about the repository whether or not it has
# already been cloned locally. # already been cloned locally.
- git: repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout clone=no update=no - git:
repo: 'git://foosball.example.org/path/to/repo.git'
dest: /srv/checkout
clone: no
update: no
# Example checkout a github repo and use refspec to fetch all pull requests # 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 refspec=+refs/pull/*:refs/heads/* - git:
repo: 'https://github.com/ansible/ansible-examples.git'
dest: /src/ansible-examples
refspec: '+refs/pull/*:refs/heads/*'
''' '''
import os import os