# Using lookup with log\_path in ansible.cfg

**URL:** <https://forum.ansible.com/t/using-lookup-with-log-path-in-ansible-cfg/22435>\
**Category:** Ansible Project\
**Created:** [August 31, 2016, 5:47pm UTC](https://forum.ansible.com/t/using-lookup-with-log-path-in-ansible-cfg/22435 "2016-08-31T17:47:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Ying](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@Kevin\_Ying](https://forum.ansible.com/u/Kevin_Ying)\
**Post date:** [August 31, 2016, 5:47pm UTC](https://forum.ansible.com/t/using-lookup-with-log-path-in-ansible-cfg/22435/1 "2016-08-31T17:47:27Z")

</div>

I’ve seen some examples referring to the use of lookup with log\_path to log output to datestamped logfiles:

e.g.

log\_path = ~/.ansible/logs/ansible.{{ lookup(‘pipe’, ‘date +%Y%m%d’) }}.log

I’ve been trying various permutations of this pattern but nothing seems to work. File permissions are correct as the logfile that is written to is quite literally the label from above including the curly braces and parens.

Is this use of lookup with log\_path in ansible.cfg no longer supported?

---

<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:** [September 20, 2016, 3:28pm UTC](https://forum.ansible.com/t/using-lookup-with-log-path-in-ansible-cfg/22435/2 "2016-09-20T15:28:11Z")

</div>

This won’t work, I don’t believe it ever has as there is no general templating support in ansible.cfg.

A few things like `ansible_managed` have a ‘special’ substitution or use of ~/ or $HOME for some paths, but nothing allows for lookups or any other jinja2 templating.
