git pull failing without error

Using ansible 1.9.4, the git checkout task below was working for me up until a few days ago:

  • name: “Update from git repo”
    git:
    repo: “git@github.com:mine/foo.git”
    dest: “/some/path”
    version: “dev”
    accept_hostkey: yes
    key_file: “/some/path/.ssh/id_rsa”

Now, all of a sudden it is failing:

failed: [domain.edu] => {“failed”: true}

msg: Failed to checkout branch dev

FATAL: all hosts have already failed – aborting

Clearly something has changed but I’m not sure what. However, the error is so vague I’ve got no clue how to debug. And when I run my playbook with -vvvv I still don’t get anything useful.

The branch name has not changed, and as root on the host, I can “git pull” just fine. And if I do update it manually, ansible still can’t get past this task. I do notice that verbose output seems to report the repo var as empty:

REMOTE_MODULE git version=dev key_file=/var/www/.ssh/id_rsa dest=/opt/portal repo=

Even though it’s not. Is there any other way to get useful troubleshooting info here? Clues?

Thanks.

Still not sure what was going on with this or why I couldn’t get useful debug info on the problem, but finally rewrote the task as a simple command: block rather than a git: block:

`

  • name: “Update code from git repo”
    command: “git pull chdir={{ project_root }}”
    tags:
  • “git”
  • “simple”
    `

which works fine. Odd.

./s