I am running into an interesting issue, and wondered if anyone has hit the same thing as I have. We have our sudo configs locked down pretty tight, and don’t allow users to do execute a shell directly using sudo. So, basically, things like sudo /bin/sh are not permitted. I found a 5 year old stacktrace article with a workaround, and I am not particularly fond of the suggestion, which was to make a copy of /bin/sh as a different filename, then tell ansible to use that via the ansible config. ( https://stackoverflow.com/questions/33529850/ansible-have-sudo-but-no-root)
Has anyone seen this before, and if so, I am curious as to what your workaround was.
–john