Ok, never mind, I solved it. I had failed to notice that the top level playbook had ' become: true', and so the docker_login was running as root, and not the user I was expecting.
-- 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 post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/42c5d3b3-0fad-4709-a757-9e8eba6430c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.