Hello,
We are using multiple ansible playbook repositories in our company. While we want to make some configuration directives local only for a specific repository, there are some which need to be defined for every current and future repo used in our setup.
A fine example is a log_path directive. Let’s say that we want to log every future ansible command run on a master machine to a /var/log/ansible.log which is independent of the repository from which the run was made. This is why I added the following lines to /etc/ansible/ansible.cfg:
[defaults]
log_path = /var/log/ansible.log
However, all directives defined in this file are being ignored, when ${PWD}/ansible.cfg configuration file is present.
I’ve prepared a small patch to deal with this issue: https://github.com/D3DeFi/ansible/commit/09973901057084f6d06f989ff9b2915a8390e57c but I am not sure if it is a good idea to submit it as a feature_request or bugfix, or if to submit it at all. Bugfix, because this ‘override’ behavior is standard for many other tools and I think it should be default for ansible as well.
Can you guys please provide your opinion on this ? Is this even a good idea or does ansible read only one ansible.cfg file for purpose ?
Thanks,
Dusan