# task local vars?

**URL:** <https://forum.ansible.com/t/task-local-vars/17916>\
**Category:** Ansible Developer\
**Created:** [April 7, 2015, 1:25am UTC](https://forum.ansible.com/t/task-local-vars/17916 "2015-04-07T01:25:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris11](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@Chris11](https://forum.ansible.com/u/Chris11)\
**Post date:** [April 7, 2015, 1:25am UTC](https://forum.ansible.com/t/task-local-vars/17916/1 "2015-04-07T01:25:56Z")

</div>

I request comments on the following idea:  
The ability to specify vars directly on a task.

I found myself needing something like this recently on a template task. The template required variables with some specific names, and I had no way to bring those vars into existence.

Example below.

---

<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:** [April 7, 2015, 2:54am UTC](https://forum.ansible.com/t/task-local-vars/17916/2 "2015-04-07T02:54:27Z")

</div>

this is something I'm looking to add in v2, being able to specify  
vars: at any level
