# Can I modify Ansible 'remote\_tmp' on a per task basis?

**URL:** <https://forum.ansible.com/t/can-i-modify-ansible-remote-tmp-on-a-per-task-basis/36210>\
**Category:** Ansible Project\
**Created:** [January 17, 2022, 10:00pm UTC](https://forum.ansible.com/t/can-i-modify-ansible-remote-tmp-on-a-per-task-basis/36210 "2022-01-17T22:00:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BOB\_BOB](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@BOB\_BOB](https://forum.ansible.com/u/BOB_BOB)\
**Post date:** [January 17, 2022, 10:00pm UTC](https://forum.ansible.com/t/can-i-modify-ansible-remote-tmp-on-a-per-task-basis/36210/1 "2022-01-17T22:00:28Z")

</div>

I am running some tasks with delegate\_to. When those tasks run, they use the same remote\_tmp directory setup from the _ansible.cfg_.  
However, due to permissions and directory size issues, I need to change the remote\_tmp directory for tasks that I am using delegate\_to for.

Example:

- name: Create Temp Dir

delegate\_to: localhost

file:

path: “{{ my\_temp\_dir }}”

state: directory

I am using Ansible 2.3.2.

Thanks for any help!
