jcalazan / ansible-django-stack

Ansible Playbook for setting up a Django app with Nginx, Gunicorn, PostgreSQL, Celery, RabbitMQ, Supervisor, Virtualenv, and Memcached. A Vagrantfile for provisioning a VirtualBox virtual machine is included as well.
MIT License
1.37k stars 392 forks source link

Is the current "Upgrade pip" task actually doing anything? #187

Open YPCrumble opened 2 years ago

YPCrumble commented 2 years ago

In roles/base/tasks/main.yml we have this task:

- name: Upgrade pip
  pip: name=pip state=latest
  tags:
    - packages
    - skip_ansible_lint

It appears that this command runs outside of the virtualenvironment, so I'm not sure why we need to upgrade pip here. This also begs the question as to whether we need to move this task so that it's part of the sequence where the virtualenv is already activated instead of here, where we're installing system packages on Ubuntu.

StuartMacKay commented 1 year ago

Can confirm that pip is not updated since the date of the first install.

If all the package version numbers are pinned then it does not matter if pip is upgraded automatically. If you do upgrade anything then it would be important to have the pip version locally or on staging the same as prod to avoid any surprises on deploy. If any mismatch occurred it would be between local and prod which would mean, if you tend to deploy straight to prod (which I do), that you'd need to keep pip versions reasonably in sync.