Celery doesn't always restart. Try to make a reproducible test case for celery related code.
Run:
vagrant up
ssh-copy-id vagrant@localhost -p 2222
ansible -m ping all
ansible-playbook setup.yml
after SSH-ing into the machine:
#shell 1
celery -A tasks worker --loglevel=info
#shell 2
ipython -i /vagrant/run.py