mirror of
https://github.com/ansible/ansible.git
synced 2026-08-01 00:34:56 +02:00
This works around issues on RHEL 7.9 when an old version of pexpect is installed from an OS package.
20 lines
545 B
YAML
20 lines
545 B
YAML
- name: Copy constraints file
|
|
copy:
|
|
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
|