git version not cloning branch

hi,
I’m using the git module, specifying ‘centos’ as the version. ‘centos’ is the name of a branch in my gitlab repo.
No errors, and the clone part works but always ‘master’ is what’s left in the destination. I suppose the code actually does a clone and then a checkout of the branch.
So it looks like the checkout is not happening.

ansible 2.6.2, python 2.7.5

I get this response:
changed: [mymachine] => (item={u’version’: u’centos’, u’reponame’: u’myrepo’, u’destname’: u’/path/to/code/repodir’})

What am I doing wrong? This is the relevant snip from my playbook.

  • name: retrieve repos
    become_user: myusername
    git:
    repo: git@gitlab.myco.com:myusername/{{ item.reponame }}.git
    accept_hostkey: yes
    ssh_opts: “-o StrictHostKeyChecking=no”
    clone: yes
    force: yes
    dest: “{{ item.destname }}”

loop:

  • {‘reponame’: ‘myrepo’, ‘destname’: “{{coderoot}}/myrepo”, ‘version’: ‘centos’}
    more repos go here…

you need to add version: centos