# How to use Ansible to Replace or override the path in a Linux file

**URL:** <https://forum.ansible.com/t/how-to-use-ansible-to-replace-or-override-the-path-in-a-linux-file/26038>\
**Category:** Ansible Project\
**Created:** [November 15, 2017, 6:20pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-replace-or-override-the-path-in-a-linux-file/26038 "2017-11-15T18:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibhu](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bibhu](https://forum.ansible.com/u/bibhu)\
**Post date:** [November 15, 2017, 6:20pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-replace-or-override-the-path-in-a-linux-file/26038/1 "2017-11-15T18:20:00Z")

</div>

Hi ,

Impala-shell script is there under /usr/bin/ in 50 machines . I want to replace or override PYTHON\_EGG\_CACHE= /tmp/impala-shell-python-egg-cache-${USER} TO PYTHON\_EGG\_CACHE=/var/tmp/impala-shell-python-egg-cache-${USER} using Ansible . could you please suggest

Thanks and Regards

Bibhu

---

<div class="post-metadata">

**Author:** ![Fabian\_B](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Fabian\_B](https://forum.ansible.com/u/Fabian_B)\
**Post date:** [November 15, 2017, 7:34pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-replace-or-override-the-path-in-a-linux-file/26038/2 "2017-11-15T19:34:00Z")

</div>

Hey Bibhu,

Have you tried using the line-in-file module to set that within your script or setting it in your application server’s conf file. From there you should be able to restart your application or server and have the changes take effect.
