Why didn't i see the original post? Was it sent to GTALUG?

The way I would do what you want to do is, that I would copy the current /etc/ansible to the repo's root and then symlink back.

Alternatively I would make a new repo in /etc/ansible.

Finally, the most hacky way (read: prone to unexpected consequences ): do a commit hook that copies / merges the /etc/ansible to <reporoot>/etc/ansible/

David



On Wed, Jul 22, 2015 at 4:56 PM, Myles Braithwaite <me@mylesbraithwaite.com> wrote:
William Muriithi wrote:
> Afternoon
>
> I have a git repo called configurations. I want to add the directory /etc/ansible to the repo.
>
> Problem is when I clone the repo, I am not able to commit the ansible directory as the ansible root directory is outside the repo?
>
> Is there a way of getting the ansible directory into git without using a symlink?

No. The work tree has to existing in the same root directory and cannot
be outside the repository.

The only two way you could do it is with a symlink or making
/etc/ansible a git repo. etckeeper[1] might be checking out as while.

[1]: <https://joeyh.name/code/etckeeper/>
---
Talk Mailing List
talk@gtalug.org
http://gtalug.org/mailman/listinfo/talk