diff options
Diffstat (limited to '')
3 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/targets/setup_pexpect/files/constraints.txt b/test/integration/targets/setup_pexpect/files/constraints.txt new file mode 100644 index 0000000..c78ecda --- /dev/null +++ b/test/integration/targets/setup_pexpect/files/constraints.txt @@ -0,0 +1,2 @@ +pexpect == 4.8.0 +ptyprocess < 0.7.0 ; python_version < '2.7' # ptyprocess >= 0.7.0 not compatible with Python 2.6 diff --git a/test/integration/targets/setup_pexpect/meta/main.yml b/test/integration/targets/setup_pexpect/meta/main.yml new file mode 100644 index 0000000..1810d4b --- /dev/null +++ b/test/integration/targets/setup_pexpect/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/test/integration/targets/setup_pexpect/tasks/main.yml b/test/integration/targets/setup_pexpect/tasks/main.yml new file mode 100644 index 0000000..84b7bd1 --- /dev/null +++ b/test/integration/targets/setup_pexpect/tasks/main.yml @@ -0,0 +1,19 @@ +- 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 |