From b801ef15c9adbbf88233cb376ec7e1dfe908c9fd Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 28 Feb 2022 12:22:46 -0800 Subject: [PATCH] [stable-2.12] 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 ci_complete --- 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 690fe44152c..84b7bd1ca7f 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