Change pip install task state to 'latest'

Currently all pip install tasks only require the package to be
present. This means that when an environment undergoes a minor
upgrade the package is not upgraded to the same version that
was tested with. This ultimately results in a deployed
environment that does not match the tested environment.

While for the services installed into venvs this is not an
issue, it does affect those which do not use venvs and any
packages which are installed outside of a venv or on top
of a venv.

This patch changes the behaviour to ensure that the install
task will always use the latest available package. In
developer_mode this will mean using the version specified
in upper-constraints, and in an integrated build this will
mean the version which is available in the wheel repo's
folder for the tag.

Change-Id: I22821cb24642aad4bface0ae0838351cd0cce257
This commit is contained in:
Jesse Pretorius 2016-05-04 10:38:50 +01:00
parent d13c448805
commit 5ce4d64150
3 changed files with 9 additions and 9 deletions

View File

@ -135,7 +135,7 @@
- name: Install requires pip packages
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options_fact }}"
register: install_packages
until: install_packages|success
@ -250,7 +250,7 @@
- name: Install pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options_fact }}"
@ -270,7 +270,7 @@
- name: Install pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options_fact }}"
register: install_packages
until: install_packages|success

View File

@ -15,7 +15,7 @@
- name: Install nuage neutron pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
retries: 5
@ -32,7 +32,7 @@
- name: Install nuage neutron pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
retries: 5
delay: 2
with_items:

View File

@ -35,7 +35,7 @@
- name: Install plumgrid pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options|default('') }}"
@ -56,7 +56,7 @@
- name: Install plumgrid pip packages fall back (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "--isolated"
@ -77,7 +77,7 @@
- name: Install plumgrid pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options|default('') }}"
register: install_packages
until: install_packages|success
@ -96,7 +96,7 @@
- name: Install plumgrid pip packages fall back (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "--isolated"
register: install_packages_fall_back
until: install_packages_fall_back|success