Ansible AWX Errors

HI Team,
I am getting below error while running a shell script through Ansible AWX. initially i was getting error like below.

fatal: [XX.XXX.XX.XX]: FAILED! => {
“changed”: false,
“module_stderr”: “”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: -9
}

after getting this error i ran the script manually from the bash shell and tested.i got the expected output. again i tested from AWX and this time the job is successfull without the above error. can someone help why i was getting this error and how it got fixed ?