From 19ef86c627f6ae59b16b5a7c5cd99727ca705cf0 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 17 Jun 2020 12:31:41 -0600 Subject: [PATCH] Ensure pip is installed We need pip and virtualenv for molcule jobs. This was dropped recently in the base image so we need to handle this ourselves. Change-Id: Ie5ba86c4d8aa97959d7336886536dc1439ce54bd --- tripleo_ansible/roles/test_deps/tasks/main.yml | 2 ++ zuul.d/playbooks/pre.yml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/tripleo_ansible/roles/test_deps/tasks/main.yml b/tripleo_ansible/roles/test_deps/tasks/main.yml index 03a81be3f..dbbe191f8 100644 --- a/tripleo_ansible/roles/test_deps/tasks/main.yml +++ b/tripleo_ansible/roles/test_deps/tasks/main.yml @@ -54,11 +54,13 @@ dest: /etc/yum.repos.d/delorean.repo - name: Install tripleo-repos package + become: true package: name: "python*tripleo-repos" state: present - name: Tripleo setup block + become: true when: - (ansible_os_family | lower) == 'redhat' - test_deps_setup_tripleo | bool diff --git a/zuul.d/playbooks/pre.yml b/zuul.d/playbooks/pre.yml index 7f445a113..32aa3d5a3 100644 --- a/zuul.d/playbooks/pre.yml +++ b/zuul.d/playbooks/pre.yml @@ -18,10 +18,15 @@ path: "{{ ansible_user_dir }}/zuul-output/logs" state: directory + - name: Ensure pip is available + include_role: + name: ensure-pip + - name: Setup bindep pip: name: "bindep" virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true - name: Run bindep @@ -34,6 +39,7 @@ pip: requirements: "{{ tripleo_ansible_project_path }}/molecule-requirements.txt" virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true - name: Display test-python virtualenv package versions