-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules shell and command only output MODULE FAILURE on error #18846
Comments
This fix ensures that if there are specific module errors (in our case the python interpreter was not found) then command and shell returns a proper error. It also fixes a few other imperfections that we noticed during troubleshooting: - Return the real RC if it were available - Improve a dictionary evaluation using .get() - Return an RC of -1 if it is unknown (instead of returning 0) This fixes ansible#18846
This fix ensures that if there are specific module errors (in our case the python interpreter was not found) then command and shell returns a proper error. It also fixes a few other imperfections that we noticed during troubleshooting: - Return the real RC if it were available - Improve a dictionary evaluation using .get() - Return an RC of -1 if it is unknown (instead of returning 0) This fixes #18846
I have face the same issue as below Error [ansible-user@ansiblemaster linux-ping]$ ansible centos -m ping ansiblenode1 | FAILED! => { Resolution: Post addition of ansible user into the /etc/sudoers file issue got fixed. Output |
ISSUE TYPE
COMPONENT NAME
command / shell
ANSIBLE VERSION
v2.2
CONFIGURATION
hosts
OS / ENVIRONMENT
Any
SUMMARY
The shell and command modules do not provide any indication to what the error is, it only outputs MODULE FAILURE
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: