I think this is a bug (https://github.com/ansible/ansible/issues/16833) where file lookup doesn't get sudo permission on localhost even with become=true. In my testing, shell command on localhost requiring sudo works fine with become=true.
-- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/47f1f737-014c-4ea9-aa2a-206264ce0a18%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
