From be8c20f6751b378899c8e87a5c6212f9a406e20e Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 28 Feb 2022 12:22:46 -0800 Subject: [stable-2.9] Update setup_pexpect to prefer pip user installs. This works around issues on RHEL 7.9 when an old version of pexpect is installed from an OS package. (cherry picked from commit 27fe26edbf57a39a11de7dea14dc60d4a6b1384e) Co-authored-by: Matt Clay --- test/integration/targets/setup_pexpect/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/targets/setup_pexpect/tasks/main.yml b/test/integration/targets/setup_pexpect/tasks/main.yml index 690fe44152..84b7bd1ca7 100644 --- a/test/integration/targets/setup_pexpect/tasks/main.yml +++ b/test/integration/targets/setup_pexpect/tasks/main.yml @@ -3,8 +3,17 @@ src: constraints.txt dest: "{{ remote_tmp_dir }}/pexpect-constraints.txt" +- name: Install pexpect with --user + pip: + name: pexpect + extra_args: '--user --constraint "{{ remote_tmp_dir }}/pexpect-constraints.txt"' + state: present + ignore_errors: yes # fails when inside a virtual environment + register: pip_user + - name: Install pexpect pip: name: pexpect extra_args: '--constraint "{{ remote_tmp_dir }}/pexpect-constraints.txt"' state: present + when: pip_user is failed -- cgit v1.2.1