diff options
Diffstat (limited to 'test/integration/targets/setup_paramiko')
8 files changed, 27 insertions, 1 deletions
diff --git a/test/integration/targets/setup_paramiko/aliases b/test/integration/targets/setup_paramiko/aliases new file mode 100644 index 0000000000..c49be25410 --- /dev/null +++ b/test/integration/targets/setup_paramiko/aliases @@ -0,0 +1 @@ +needs/target/setup_remote_tmp_dir diff --git a/test/integration/targets/setup_paramiko/constraints.txt b/test/integration/targets/setup_paramiko/constraints.txt new file mode 100644 index 0000000000..c502ba0d9c --- /dev/null +++ b/test/integration/targets/setup_paramiko/constraints.txt @@ -0,0 +1 @@ +cryptography >= 2.5, < 3.4 diff --git a/test/integration/targets/setup_paramiko/install-Alpine-3-python-3.yml b/test/integration/targets/setup_paramiko/install-Alpine-3-python-3.yml index 144e1e1e37..f16d9b5311 100644 --- a/test/integration/targets/setup_paramiko/install-Alpine-3-python-3.yml +++ b/test/integration/targets/setup_paramiko/install-Alpine-3-python-3.yml @@ -1,6 +1,9 @@ +- name: Setup remote constraints + include_tasks: setup-remote-constraints.yml - name: Install Paramiko for Python 3 on Alpine pip: # no apk package manager in core, just use pip name: paramiko + extra_args: "-c {{ remote_constraints }}" environment: # Not sure why this fixes the test, but it does. SETUPTOOLS_USE_DISTUTILS: stdlib diff --git a/test/integration/targets/setup_paramiko/install-Darwin-python-3.yml b/test/integration/targets/setup_paramiko/install-Darwin-python-3.yml index a156f8066a..8926fe333e 100644 --- a/test/integration/targets/setup_paramiko/install-Darwin-python-3.yml +++ b/test/integration/targets/setup_paramiko/install-Darwin-python-3.yml @@ -1,6 +1,9 @@ +- name: Setup remote constraints + include_tasks: setup-remote-constraints.yml - name: Install Paramiko for Python 3 on MacOS pip: # no homebrew package manager in core, just use pip name: paramiko + extra_args: "-c {{ remote_constraints }}" environment: # Not sure why this fixes the test, but it does. SETUPTOOLS_USE_DISTUTILS: stdlib diff --git a/test/integration/targets/setup_paramiko/install-FreeBSD-11-python-3.yml b/test/integration/targets/setup_paramiko/install-FreeBSD-11-python-3.yml index b8ca6c9e1d..eb01d00f1e 100644 --- a/test/integration/targets/setup_paramiko/install-FreeBSD-11-python-3.yml +++ b/test/integration/targets/setup_paramiko/install-FreeBSD-11-python-3.yml @@ -4,6 +4,9 @@ # installation without a virtualenv succeeds pip: name: pip==18.1 +- name: Setup remote constraints + include_tasks: setup-remote-constraints.yml - name: Install Paramiko for Python 3 on FreeBSD 11 pip: # no py36-paramiko package exists for FreeBSD 11 name: paramiko + extra_args: "-c {{ remote_constraints }}" diff --git a/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml b/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml index dbc0f65c59..19fd3f63ab 100644 --- a/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml +++ b/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml @@ -1,3 +1,6 @@ +- name: Setup remote constraints + include_tasks: setup-remote-constraints.yml - name: Install Paramiko for Python 3 on RHEL 8 pip: # no python3-paramiko package exists for RHEL 8 name: paramiko + extra_args: "-c {{ remote_constraints }}" diff --git a/test/integration/targets/setup_paramiko/setup-remote-constraints.yml b/test/integration/targets/setup_paramiko/setup-remote-constraints.yml new file mode 100644 index 0000000000..a86d47777c --- /dev/null +++ b/test/integration/targets/setup_paramiko/setup-remote-constraints.yml @@ -0,0 +1,12 @@ +- name: Setup remote temporary directory + include_role: + name: setup_remote_tmp_dir + +- name: Record constraints.txt path on remote host + set_fact: + remote_constraints: "{{ remote_tmp_dir }}/constraints.txt" + +- name: Copy constraints.txt to remote host + copy: + src: "constraints.txt" + dest: "{{ remote_constraints }}" diff --git a/test/integration/targets/setup_paramiko/setup.sh b/test/integration/targets/setup_paramiko/setup.sh index 64b935cdd8..9f7afcbbed 100644 --- a/test/integration/targets/setup_paramiko/setup.sh +++ b/test/integration/targets/setup_paramiko/setup.sh @@ -4,5 +4,5 @@ set -eux source virtualenv.sh # for pip installs, if needed, otherwise unused -ansible-playbook ../setup_paramiko/install.yml -i ../setup_paramiko/inventory "$@" +ANSIBLE_ROLES_PATH=../ ansible-playbook ../setup_paramiko/install.yml -i ../setup_paramiko/inventory "$@" trap 'ansible-playbook ../setup_paramiko/uninstall.yml -i ../setup_paramiko/inventory "$@"' EXIT |