# Handling ansible.cfg file for distributed version controlled projects

**URL:** <https://forum.ansible.com/t/handling-ansible-cfg-file-for-distributed-version-controlled-projects/24255>\
**Category:** Ansible Project\
**Created:** [April 19, 2017, 9:56pm UTC](https://forum.ansible.com/t/handling-ansible-cfg-file-for-distributed-version-controlled-projects/24255 "2017-04-19T21:56:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![burns498](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@burns498](https://forum.ansible.com/u/burns498)\
**Post date:** [April 19, 2017, 9:56pm UTC](https://forum.ansible.com/t/handling-ansible-cfg-file-for-distributed-version-controlled-projects/24255/1 "2017-04-19T21:56:55Z")

</div>

All - A question about ansible.cfg maintenance for distributed version controlled projects. This may be more of a general version control question than anything specific to Ansible, but figured you all may have ran into this before.

In my ansible.cfg file, I have a hard coded log\_path to where I want logs to write. When I clone the repo, I would need to update this variable to the new log location. If I don’t, then logs from staging may write into production and cause merge conflicts. How are you all maintain ansible.cfg files that get cloned around via version control tools?

I have a Git origin master (production) and a clone (staging) on the same server. There are some other custom variables in my ansible.cfg. They remain static, but I can’t just use the default ansible.cfg under /etc/. I can’t use the default log location because this server is used by more than one project, so I need to write my logs to my own spot.

So far I’ve tried combinations of .gitignore, git assume-unchanged, and git cached. All of them work up front, but aren’t sustainable for new clones or long term use.

Any thoughts? Thank you!
