Generally speaking, ansible does not run many shell commands to perform these actions. Instead many modules rely on executing python code that will achieve your goal.
As such, restricting sudo to something like `cp` can't work for the `copy` module.
Instead we run something more like `sudo /bin/sh -c '/usr/bin/python /path/to/some/temp/python/script.py'`
You *can* achieve results similar to what you want, by severely restricting yourself to only using the raw/command/shell modules like:
- command: sudo cp foo bar
It isn't really recommended to do this, as it doesn't support password prompting, and you lose a lot of additional functionality provided by the other ansible modules.
Also, let me pose this question, how is allowing `sudo cp` more secure? I would assume most configurations would allow: sudo cp give_me_access_sudoers /etc/sudoers
I'd recommend talking to the person responsible for your sudoers configuration.