It seems like that something that your script is doing is causing the command module to fail. Without seeing the code for script_name.sh it is hard to make any useful suggestions about what is causing the failure.
Also its possible you need some environment variables set by your login shell, so you might need to be using 'shell' instead of command. If possible I suggest breaking the script_name.sh into several separate scripts to help narrow down where it fails. Hope this helps, Jon On Tuesday, January 23, 2018 at 3:01:06 PM UTC, Jayashri Garud wrote: > > Sorry JYL. I posted it wrongly. It is actually > > - name: deploy script_name script > command: /path/to/script/script_name.sh > > > > > On Tue, Jan 23, 2018 at 6:00 PM, <jean...@lenhof.eu.org <javascript:>> > wrote: > >> >> >> 23 janvier 2018 13:07 "Jayashri Garud" <jayashri...@gmail.com >> <javascript:>> a écrit: >> >> Hi, >> I have a playbook for deployment . In which I have a task which execute >> script to extract artifacts. I am using jenkins server to run ansible. >> while running this playbook it is throwing error like "MODULE FAILURE". >> deployment.yml >> - run deployment script >> command: /path/to/my/script/.sh >> error: >> >> FAILED! => {"changed": false, "failed": true, "module_stderr": "", >> "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false} >> >> ansible version -2.0.0 >> >> >> Try this : >> - name: run deployment script >> command: /path/to/my/script/.sh >> >> Explanations : >> You forget to add "name" before describiing the action.... So ansible try >> to interpret "run" as a module >> Be careful about indentations >> >> Regards, >> >> JYL >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Ansible Project" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/ansible-project/6nEUY2Qfboo/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> ansible-proje...@googlegroups.com <javascript:>. >> To post to this group, send email to ansible...@googlegroups.com >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/a115e58a4bf6968a6f500898763375a7%40wwws.lenhof.eu.org >> >> <https://groups.google.com/d/msgid/ansible-project/a115e58a4bf6968a6f500898763375a7%40wwws.lenhof.eu.org?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7436be60-c1c4-407b-80ac-cb65b4609771%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.