Docker pull with sudo inline works but sudo enabled at the top of the ansible playbook fails

Hello there;

  Has anybody experienced a problem with "docker pull" as the action
of an ansible playbook when sudo is enabled at the top of the ansible
playbook, but the failure goes away when the action is replaced by
"sudo docker pull"?

  All my other docker actions work fine with sudo enabled at the top
of the ansible playbook.

ansible 1.8.2 on Mac via homebrew

Thanks,
Ken Wolcott

Hello again;

  I tried an experiment where I added the one and only account on the
vm in question to be a member of the docker group. Apparently, a
member of the docker group cannot perform a docker pull, but only sudo
docker pull.

   Hmmm. I will try experimenting again with the docker Ansible module
and see if I weirdness here as well.

Thanks,
Ken Wolcott

I guess monologues are boring to others, but here goes with more info...

Doing a docker pull of a public docker image works fine without sudo
if the user is a member of the docker group, but apparently if sudo
was required previously to perform a docker pull, it will always be
required (at least for private images) on DockerHub?

I'd sure like someone to explain this to me.

Thanks,
Ken Wolcott