Hey all – suppose I had the following task in a playbook:

- name: "Clone aire_core repo"
  git:
    repo: "[email protected]:joe/my_repo.git"
    dest: "/home/me/my_repo"
    depth: 1
    version: "{{ git_branch }}"
    key_file: "~/.ssh/id_rsa"
    update: true

I set `git_branch` to master, clone and everything is fine. However, should 
I choose to point my branch to `foo` at some point in the future, I get a 
complaint that git doesn't have the `foo` branch.

I expected I could perhaps work around it without having to delve into code 
by adding a refspec attribute and seeing if it would fetch the relevant 
branch, to no avail.
    refspec: "+refs/heads/{{ git_branch }}:refs/remotes/origin/{{ 
git_branch }}"


So is this desired behaviour, or is there something I'm missing? Am I 
really supposed to be tearing down my repo if I'm expected to be changing 
branches regularly?

-- 
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/f3603c87-8310-43be-9209-d296ce1c11d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to