summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-02-28 12:22:46 -0800
committerMatt Clay <matt@mystile.com>2022-02-28 14:38:24 -0800
commit0d087a95b2a893fe35f0b33b01d11494ac754f6b (patch)
treea05cfa2329db3da93f08cac4c3d252ced1f94b11
parent98c41fd739173887df10867ca4b3fdadfcb1a0b3 (diff)
downloadansible-0d087a95b2a893fe35f0b33b01d11494ac754f6b.tar.gz
[stable-2.10] 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 <matt@mystile.com>
-rw-r--r--test/integration/targets/setup_pexpect/tasks/main.yml9
1 files changed, 9 insertions, 0 deletions
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