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.
-- ---------- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7d7ZAGjw8YH8PgVHP7f7S_Pd%3Dg-fdg2zWDc1WUM%2BrMiGw%40mail.gmail.com.