You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseException('Failed to validate sudoers rule:\n{stdout}'.format(stdout=stdout))
Ending up with
"msg": "Failed to validate sudoers rule:\n"
I'm not sure if a simple replacement of stdout -> stderr would be the right fix, I don't know under how many conditions, and different validation methods, and different failure types this is supposed to work. Probably a good solution would involve presenting both stdout and stderr.
Summary
Suppose I want to add a silly sudoer rule such as
The validation with
visudo
will fail becausecrontab
is not a fully qualified path. That (very useful) information is given throughstderr
But the user will just be shown the
stdout
(in this case, that's empty) as percommunity.general/plugins/modules/sudoers.py
Line 249 in 7a6125b
Ending up with
I'm not sure if a simple replacement of stdout -> stderr would be the right fix, I don't know under how many conditions, and different validation methods, and different failure types this is supposed to work. Probably a good solution would involve presenting both stdout and stderr.
Issue Type
Bug Report
Component Name
sudoers
Ansible Version
Community.general Version
Configuration
OS / Environment
Both the controller and managed node are docker containers from
python:3.12-bookworm
Steps to Reproduce
Expected Results
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: