I seem to have a problem where if two branches point to the same commit but have a different name the ansible git module may fail. I believe the reason is that when the module sees that the commits are the same between HEAD on the local repo, and the remote requested branch, it doesn’t bother to do a fetch to update the local branches
Here is a playbook I created that demonstrates the issue, the last step in the play fails and it isn’t clear to me why it should fail.