# Overriding log\_path for each invocation of ansible-playbook

**URL:** <https://forum.ansible.com/t/overriding-log-path-for-each-invocation-of-ansible-playbook/17148>\
**Category:** Ansible Project\
**Created:** [December 28, 2014, 3:49am UTC](https://forum.ansible.com/t/overriding-log-path-for-each-invocation-of-ansible-playbook/17148 "2014-12-28T03:49:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Bamford](https://avatars.discourse-cdn.com/v4/letter/t/c2a13f/32.png) [@Tom\_Bamford](https://forum.ansible.com/u/Tom_Bamford)\
**Post date:** [December 28, 2014, 3:49am UTC](https://forum.ansible.com/t/overriding-log-path-for-each-invocation-of-ansible-playbook/17148/1 "2014-12-28T03:49:37Z")

</div>

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

​

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [December 29, 2014, 4:21pm UTC](https://forum.ansible.com/t/overriding-log-path-for-each-invocation-of-ansible-playbook/17148/2 "2014-12-29T16:21:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tom\_Bamford](https://avatars.discourse-cdn.com/v4/letter/t/c2a13f/32.png) [@Tom\_Bamford](https://forum.ansible.com/u/Tom_Bamford)\
**Post date:** [December 29, 2014, 7:17pm UTC](https://forum.ansible.com/t/overriding-log-path-for-each-invocation-of-ansible-playbook/17148/3 "2014-12-29T19:17:02Z")

</div>

Hi Brian

Thank you! This will work nicely.

Regards  
Tom
