Personally I store nothing in /etc/ansible. But I install and run ansible using a virtualenv so /etc/ansible was never there for me.
You definitely should look at the official recommended layout, but my minimal ansible hierachy is as follow:
inventories
hosts
vars
roles
role1
role2
....
ansible.cfg
site.yml
I clone the repository to /home/victor/git/ansible and I put these lines in my bashrc to set the default ansible paths:
export ANSIBLE_INVENTORY=/home/victor/git/ansible/inventories/hosts
export ANSIBLE_CONFIG=/home/victor/git/ansible/ansible.cfg
There are two rules that I always follow:
- Everytime before I run a playbook, I pull from git to make sure I am running the latest version.
- Whenever I make a change to the playbook, I would always run them first to make sure there are no error before I commit to the repository.
If you are using ansible to distribute secrets or credentials, you also want to use ansible-vault to encrypt them before you commit to git. DO NOT put any plain credentials on a git repository.
I suppose in this use case having a .git folder is not an issue at all (I guess you didn't want a .git folder somewhere in /etc/).