# ansible-pull, and upgrading ansible

**URL:** <https://forum.ansible.com/t/ansible-pull-and-upgrading-ansible/23849>\
**Category:** Ansible Project\
**Created:** [February 28, 2017, 10:07pm UTC](https://forum.ansible.com/t/ansible-pull-and-upgrading-ansible/23849 "2017-02-28T22:07:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Tan](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Stephen\_Tan](https://forum.ansible.com/u/Stephen_Tan)\
**Post date:** [February 28, 2017, 10:07pm UTC](https://forum.ansible.com/t/ansible-pull-and-upgrading-ansible/23849/1 "2017-02-28T22:07:20Z")

</div>

Hi all

I have an interesting situation which I think the very clever people here could probably help me with.

Our use case for ansible:

- We use ansible pull which runs a local connection. It allows us to scale nicely without the need for a master host.
- ansible pull is set in a cron job that runs every hour locally
- We want to be able to upgrade ansible in place ( the best practice is to nuke our current machine and replace with a fresh packer based image but sometimes that’s not the available solution )
- If we do this with ansible, then ansible will shoot itself in the head - a chicken and egg situation

Basically, I’m asking - are there any best practices that someone can recommend for upgrading ansible using ansible?

- Perhaps there is some cunning way using vitualenv?
- Or we can get ansible to trigger it’s own upgrade using cron or some other mechanism? ( The problem is then if ansible is running when this job is run … )

There is huge kudos for the people with a nice clean, elegant solution! 🙂

many thanks in advance

Stephen
