[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 27fe26edbf)

Co-authored-by: Matt Clay <matt@mystile.com>

ci_complete
pull/77171/head
Matt Clay 4 years ago
parent 0ee3815c55
commit b801ef15c9

@ -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

Loading…
Cancel
Save