Overriding log_path for each invocation of ansible-playbook

Hi

I would like to override some configuration value, specifically log_path, for each invocation of ansible-playbook.

I have tried passing extra variables in the form ansible-playbook something.yml -e 'log_path=/some/file' to no effect.

It also seems like only a single config file is used when there are multiple ansible.cfg files in their respective locations (./ansible.cfg, ~/.ansible.cfg, /etc/ansible/ansible.cfg). One is forced to produce an entire config file simply to change a single setting.

Is there a way to arbitrarily override certain config values? Is there is a way to get Ansible to parse all config files and give corresponding precedence to individual settings therein?

Regards
Tom

Configuration is not exposed as variables, so setting a variable named
log_path will not affect the configuration setting. Only one file is
read on a 'first found' basis, they are not merged.

Many configuration options allow for an environment variable override,
for this case use ANSIBLE_LOG_PATH.

Hi Brian

Thank you! This will work nicely.

Regards
Tom