salt.states.git

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »

# salt.states.git

## Interaction with Git repositories.

NOTE: This modules 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.

    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)

  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)

`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)

## Comments

comments powered by Disqus

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »