From 407d827893f67fe24ed88e55e85fc0155dfbc265 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 12 Apr 2018 20:08:25 -0400 Subject: [PATCH] Default nodepool_pip_executable to pip3 Moving forward, we'll only support nodepool under python3. Change-Id: If0f9ed013819b68601e28ecfbeffa40a41d19ebc Signed-off-by: Paul Belanger --- .zuul.yaml | 4 ---- README.rst | 2 ++ tasks/install.yaml | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 232c9bf..a7cf79f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -6,10 +6,6 @@ - name: openstack-infra/nodepool roles: - zuul: openstack/ansible-role-nodepool - vars: - # TODO(pabelanger): This needs to fix to defaut to this when not using - # a virtualenv. - nodepool_pip_executable: pip3 # Testing for nodepool_install_method: pip - job: diff --git a/README.rst b/README.rst index b5a82a3..495c443 100644 --- a/README.rst +++ b/README.rst @@ -20,6 +20,8 @@ including Jenkins and Zuul. Requirements ------------ +* pip3 to be installed if using nodepool_install_method: (git|pip) + Packages ~~~~~~~~ diff --git a/tasks/install.yaml b/tasks/install.yaml index b77c87f..f557d67 100644 --- a/tasks/install.yaml +++ b/tasks/install.yaml @@ -25,4 +25,12 @@ with_items: "{{ nodepool_build_depends }}" when: nodepool_install_method == 'git' +- name: Define nodepool_pip_executable if needed. + set_fact: + nodepool_pip_executable: pip3 + when: + - nodepool_install_method == 'git' or nodepool_install_method == 'pip' + - nodepool_pip_virtualenv_python is not defined + - nodepool_pip_executable is not defined + - include: "install/{{ nodepool_install_method }}.yaml"