using ansible without creating a root shell?

Hello all.

Sorry if this has been answered, but I couldn’t find the thread if it has.

I’m new to ansible and have been trying to use ansible in our restricted environment and seem to be stuck… hoping someone can offer advice

Within our environment, we cannot execute sudo /bin/sh for example. The use of sudo is restricted to a subset of commands that cannot create a root shell. Even vi is restricted and we must use rvi with sudo because of the ability to create a root shell from within vi when run with sudo.

How have others been successful using Ansible in a similar environment?

Any guidance is most welcome.

Regards - Mark