Skip to content

Commit

Permalink
Add docs for file:// in gitfs
Browse files Browse the repository at this point in the history
  • Loading branch information
basepi committed May 7, 2013
1 parent 25047a0 commit cbd6492
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions conf/master
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@
# and the first repo to have the file will return it.
# When using the git backend branches and tags are translated into salt
# environments.
# Note: file:// repos will be treated as a remote, so refs you want used must
# exist in that repo as *local* refs.


##### Pillar settings #####
Expand Down
13 changes: 10 additions & 3 deletions doc/topics/tutorials/gitfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,21 @@ Assuming that the ``gitfs_remotes`` option specifies three remotes:
gitfs_remotes:
- git://github.com/example/first.git
- git://github.com/example/second.git
- git://github.com/example/third.git
- file:///root/third
.. note::

This example is purposefully contrived to illustrate the behavior of the
gitfs backend. This example should not be read as a recommended way to lay
out files and git repos.

.. note::

The file:// prefix denotes a git repository in a local directory. However,
it will still use the given file:// URL as a remote, rather than copying
the git repo to the salt cache. This means that any refs you want
accessible must exist as *local* refs in the specified repo.

Assume that each repository contains some files:

first.git:
Expand All @@ -91,10 +98,10 @@ second.git:
edit/dev_vimrc
haproxy/init.sls

third.git:
third:
haproxy/haproxy.conf
edit/dev_vimrc

The repositories will be searched for files by the master in the order in which
they are defined in the configuration, Therefore the remote
`git://github.com/example/first.git` will be searched first, if the requested
Expand Down

0 comments on commit cbd6492

Please sign in to comment.