Hi,
Currently ansible uses wrapper scripts(shell/python) for executing commands as privileged user suing sudo. Due to this its currently not possible to restrict what commands ansible fires on the remote machine after privilege escalation. Main reason being ansible required NO PASSWD:ALL or NO PASSwd:/bin/sh( which is equivalent to NO PASSWD:ALL). Is there any way to control this.
Regards
Varun