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

On Thu 24. Sep 2020 at 15:05, Kundan Singh <[email protected]>
wrote:

> 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
> }
>
>
>
> On Thursday, September 24, 2020 at 6:22:40 PM UTC+5:30 Kundan Singh wrote:
>
>> Hi All,
>>
>> Need your guidance.
>>
>> I am trying to create a file  on Ansible Tower local host.
>>
>> Below is the task which syntax
>>
>> ---
>> - name: create some file
>>
>> file: path=/tmp/risratho.txt state=touch mode='0755'
>>
>> delegate_to: localhost
>>
>>
>>
>> it is working fine on ansible engine.
>>
>> 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
>> }
>>
>>
>> please help me ...
>>
>>
>> Regards
>> Kundan Singh
>>
>>
>>
>
>
>
>
>
>
>
> --
>
>
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
>
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f53c13f2-3f26-4c95-89e0-627d0fd1e6dan%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f53c13f2-3f26-4c95-89e0-627d0fd1e6dan%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ%2BRxtTg2ys-_TaRS3EqFZ%3DQhNEMthoDggU6CCAbuJ_rMiMejw%40mail.gmail.com.

Reply via email to