Error 'msg: You need to be root to perform this command.' with sudo on

I’m getting this error with the following playbook:

“What am I doing wrong?”

Not running this step as root.

Consider “remote_user: root” in your playbook for this step, as you can’t run it as user “raven”.

Also, sudo’ing from raven to raven is a little strange, I think you probably want to just not set sudo_user, then it would assume “raven” is sudoing to “root”.