# Getting module failure while creation file on AT

**URL:** <https://forum.ansible.com/t/getting-module-failure-while-creation-file-on-at/33886>\
**Category:** Ansible Project\
**Created:** [September 24, 2020, 12:52pm UTC](https://forum.ansible.com/t/getting-module-failure-while-creation-file-on-at/33886 "2020-09-24T12:52:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@Kundan\_Singh](https://forum.ansible.com/u/Kundan_Singh)\
**Post date:** [September 24, 2020, 12:52pm UTC](https://forum.ansible.com/t/getting-module-failure-while-creation-file-on-at/33886/1 "2020-09-24T12:52:40Z")

</div>

Hi All,

Need your guidance.

I am trying to create a file on Ansible Tower local host.

Below is the task which syntax

---

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@Kundan\_Singh](https://forum.ansible.com/u/Kundan_Singh)\
**Post date:** [September 24, 2020, 1:05pm UTC](https://forum.ansible.com/t/getting-module-failure-while-creation-file-on-at/33886/2 "2020-09-24T13:05:07Z")

</div>

Task synatx

- name: create some file  
file: path=/tmp/risratho.txt state=touch mode=‘0755’  
delegate\_to: localhost

i would like to rephrase my word on ansible tower it is giving below error.

fatal: [80.0.20.219 → localhost]: FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “/bin/sh: sudo: command not found\n”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 127  
}

---

<div class="post-metadata">

**Author:** ![vinod93pop](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@vinod93pop](https://forum.ansible.com/u/vinod93pop)\
**Post date:** [October 1, 2020, 7:53am UTC](https://forum.ansible.com/t/getting-module-failure-while-creation-file-on-at/33886/3 "2020-10-01T07:53:51Z")

</div>

Make sure you have correct permission. Most case you will not have root access in tower server . Use become:false in task level to create the file as it’s delegate to localhost.

//Vinoth
