Ansible running script with wrong user

become: yes + become_method: sudo forces teh nginx_user to use root
to execute the tasks. Considering you are restarting a service, this
seems correct.