Ansible-pull and handlers

Hi everyone,
I just found out about ansible-pull and I’m pretty excited about it, but I have a small problem. ansible-pull always runs my deployment playbook, even if nothing has changed. This is a bit of a problem, because the repo is the repo that contains my actual code, so, since it has already been updated by ansible-pull, the playbook doesn’t know if any code has changed, and has to restart nginx every time.

I’d prefer ansible-pull not to run unless the repo has actually changed, since it’s idempotent, and running it if the repo hasn’t changed will do nothing. Is there any way to do this, or am I doing it the wrong way?

Thanks,
Stavros

One suggestion I might suggest is to split your code repo out from your playbook repo, and then use the git module to download your code, because the git module should return changed=True/False and allow you to use the git module handler to manage nginx.

It is true that Ansible will check to try to update your playbook repo every time, but this would keep it from updating the code every time.

How does that sound?