On 4 July 2013 06:18, Michael DeHaan <
mic...@ansibleworks.com> wrote:
> You'd actually branch the entire project, so it wouldn't affect the
> hierarchy.
>
> You could just check out the repo at two filesystem different points at
> different branches.
While I like the concept of ansible getting its info via git, I think
in general its linking something unnecessary into ansible. I'd rather
have an HTTP accessible method where (for example) ansible retrieves
playbooks etc, and writes facts back into e.g. into CouchDB. I can
replicate securely between datacentres, and share inventory across
separate secure infrastructures. I'm not sure if an HTTP arrangement
like GET /ansible/playbooks … PUT /ansible/configs/:server would be
acceptable for core ansible?
Anyway.
In git-contrib there's a module called git-new-workdir which allows
sharing the same git index across multiple working dirs. It should
come in a default install of any recent git in the last couple years.
On my OSX is set as a shell alias:
gnw='/usr/local/Cellar/git/*/share/git-core/contrib/workdir/git-new-workdir'
usage: gnw <repository> <new_workdir> [<branch>]
if your project is stored in /projects/runcible then you can have a
separate checkout like so:
gnw /projects/runcible projects/pea-green-boat leafy-branch
Inside /projects/pea-green-boat it behaves just like a normal git
clone, except that the index is shared from /projects/runcible.
A+
Dave