git
Collection: builtin
Full Name: parallax.builtin.git
Aliases: ansible.builtin.git, git
Synopsis
Manage git
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| repo | string | yes | git, SSH, or HTTP(S) protocol address of the git repository | |
| dest | string | yes | The path of where the repository should be checked out | |
| version | string | HEAD | What version of the repository to check out | |
| clone | bool | true | If no, do not clone the repository even if it does not exist locally | |
| update | bool | true | If no, do not retrieve new revisions from the origin repository | |
| force | bool | false | If yes, any modified files in the working repository will be discarded | |
| recursive | bool | true | If no, repository will be cloned without the –recursive option | |
| depth | int | 0 | Create a shallow clone with a history truncated to the specified number or revisions | |
| remote | string | origin | Name of the remote | |
| accept_hostkey | bool | false | If yes, ensure that SSH host keys are not checked | |
| key_file | string | Specify an optional private key file path, on the target host, to use for the checkout | ||
| ssh_opts | string | Options git will pass to ssh when used as protocol | ||
| bare | bool | false | If yes, repository will be created as a bare repo | |
| single_branch | bool | false | Clone only the history leading to the tip of a single branch | |
| track_submodules | bool | false | If yes, submodules will track the latest commits on their master branch | |
| verify_commit | bool | false | If yes, when cloning or fetching, verify the signature of every commit | |
| archive | string | Specify archive file path to create from the repository | ||
| separate_git_dir | string | The path to place the cloned repository’s Git directory | ||
| refspec | string | Add an additional refspec to be fetched | ||
| reference | string | Reference repository path | ||
| executable | string | git | Path to git executable to use | |
| umask | string | The umask to set before doing any checkouts |
Example
- name: Example git task
git:
repo: <your_repo>
dest: <your_dest>