Getting module failure while creation file on AT

132 views
Skip to first unread message

Kundan Singh

unread,
Sep 24, 2020, 8:52:40 AM9/24/20
to Ansible Project
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


Kundan Singh

unread,
Sep 24, 2020, 9:05:08 AM9/24/20
to Ansible Project
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.

vinoth kumar

unread,
Oct 1, 2020, 3:54:29 AM10/1/20
to ansible...@googlegroups.com
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 

--


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 ansible-proje...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f53c13f2-3f26-4c95-89e0-627d0fd1e6dan%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages