Replace host_need_pip with standard override mechanism

The variable host_need_pip is currently used to be selective
about when pip is installed on the target hosts/containers.

This is an unnecessary precaution given that if the repo
container is not yet up, there is already a mechanism in place
to detect this and override the constraint and get-pip script
URL. By using this mechanism we get pip installed very early
and pip's configuration is still correctly constrained.

This patch ensures that this very same mechanism is used across
the board instead of using two different mechanisms, thereby
simplifying the approach.

Change-Id: I22d2f5edf640b71cb80b3fd1de597ea7391db11c
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
This commit is contained in:
Jesse Pretorius 2018-02-18 15:23:31 +00:00
parent e883d33630
commit bc4f6ea47c
2 changed files with 12 additions and 10 deletions

View File

@ -53,16 +53,17 @@
tags:
- lxc-containers-create
# TODO(evrardjp): Remove host_need_pip in the future
# when the process building the repo is done before this step.
- name: Configure containers default software, but don't run pip yet
- name: Configure containers default software
hosts: all_lxc_containers
gather_facts: true
user: root
pre_tasks:
- include: common-tasks/set-upper-constraints.yml
- include: common-tasks/set-pip-upstream-url.yml
roles:
- role: "openstack_hosts"
vars:
host_need_pip: False
vars_files:
- defaults/repo_packages/openstack_services.yml
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- lxc-containers-create

View File

@ -41,17 +41,18 @@
tags:
- nspawn-containers-create
# TODO(evrardjp): Remove host_need_pip in the future
# when the process building the repo is done before this step.
- name: Configure containers default software, but don't run pip yet
- name: Configure containers default software
hosts: all_nspawn_containers
gather_facts: true
user: root
pre_tasks:
- include: common-tasks/set-upper-constraints.yml
- include: common-tasks/set-pip-upstream-url.yml
roles:
- role: "openstack_hosts"
is_container: true
vars:
host_need_pip: False
vars_files:
- defaults/repo_packages/openstack_services.yml
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- nspawn-containers-create