local sudo rsync

Hi there,

I haven’ been able to figure out how to use synchronize with local sudo, so I used a shell command: local_action: shell sudo rsync -aL --rsync-path="sudo rsync" -e "ssh -i {{ ansible_user_dir }}/.ssh/id_rsa" SRC DEST

While this works fine, I receive a message: [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather than running sudo

What is the proper way to do a sudo rsync SRC DEST? If I am already doing it properly, how can I suppress the warning?

Thanks,
Jayen

I'm not going to comment on the "proper" part.

But for the warning part is documented here
http://docs.ansible.com/ansible/latest/intro_configuration.html#command-warnings

Thanks for that. warn: no did it.