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!