salt.states.git

Interaction with Git repositories.

NOTE: This module is under heavy development and the API is subject to change. It may be replaced with a generic VCS module if this proves viable.

Important: Before using git over ssh, make sure your remote host fingerprint exists in "~/.ssh/known_hosts" file. To avoid requiring password authentication, it is also possible to pass private keys to use explicitly.

https://github.com/saltstack/salt.git:
  git.latest:
    - rev: develop
    - target: /tmp/salt
salt.states.git.latest(name, rev=None, target=None, runas=None, force=None, submodules=False, mirror=False, bare=False, remote_name='origin', identity=None, **kwargs)

Make sure the repository is cloned to the given directory and is up to date

name
Address of the remote repository as passed to "git clone"
rev
The remote branch, tag, or revision ID to checkout after clone / before update
target
Name of the target directory where repository is about to be cloned
runas
Name of the user performing repository management operations
force
Force git to clone into pre-existing directories (deletes contents)
submodules
Update submodules on clone or branch change (Default: False)
mirror
True if the repository is to be a mirror of the remote repository. This implies bare, and thus is incompatible with rev.
bare
True if the repository is to be a bare clone of the remote repository. This is incompatible with rev, as nothing will be checked out.
remote_name
defines a different remote name. For the first clone the given name is set to the default remote, else it is just a additional remote. (Default: 'origin')
identity
A path to a private key to use over SSH
salt.states.git.present(name, bare=True, runas=None, force=False)

Make sure the repository is present in the given directory

name
Name of the directory where the repository is about to be created
bare
Create a bare repository (Default: True)
runas
Name of the user performing repository management operations
force
Force-create a new repository into an pre-existing non-git directory (deletes contents)

Table Of Contents

Previous topic

salt.states.gem

Next topic

salt.states.grains