From afb2e9d02949a9b53553c3d5af4bffea462bac41 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Thu, 8 Nov 2018 17:05:54 -0500 Subject: [PATCH] Add setup roles for passlib and pexpect for use with pause and vars_prompt tests (#43613) * Add passlib to RHEL test instance This looks like the only tests instance that is missing this libary. It is needed for vars_prompt tests. * Create setup roles for pexect and passlib Switch to using aliases rather than installing directly in the test scripts (cherry picked from commit 96c2375692bcc7e9d58dd35226c7da8fef8c7fb8) --- test/integration/targets/pause/aliases | 1 + test/integration/targets/pause/runme.sh | 1 - test/integration/targets/setup_passlib/tasks/main.yml | 4 ++++ test/integration/targets/setup_pexpect/tasks/main.yml | 4 ++++ test/integration/targets/vars_prompt/aliases | 2 ++ test/integration/targets/vars_prompt/runme.sh | 9 --------- 6 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 test/integration/targets/setup_passlib/tasks/main.yml create mode 100644 test/integration/targets/setup_pexpect/tasks/main.yml diff --git a/test/integration/targets/pause/aliases b/test/integration/targets/pause/aliases index b59832142f2..447c957881a 100644 --- a/test/integration/targets/pause/aliases +++ b/test/integration/targets/pause/aliases @@ -1 +1,2 @@ +setup/always/setup_pexpect shippable/posix/group3 diff --git a/test/integration/targets/pause/runme.sh b/test/integration/targets/pause/runme.sh index 51016dd3591..5b2038541bd 100755 --- a/test/integration/targets/pause/runme.sh +++ b/test/integration/targets/pause/runme.sh @@ -25,5 +25,4 @@ ansible-playbook pause-3.yml -i ../../inventory > /dev/null \ ansible-playbook test-pause.yml -i ../../inventory "$@" # Interactively test pause -pip install pexpect python test-pause.py -i ../../inventory "$@" diff --git a/test/integration/targets/setup_passlib/tasks/main.yml b/test/integration/targets/setup_passlib/tasks/main.yml new file mode 100644 index 00000000000..e4cd0d0b754 --- /dev/null +++ b/test/integration/targets/setup_passlib/tasks/main.yml @@ -0,0 +1,4 @@ +- name: Install passlib + pip: + name: passlib + state: present 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 00000000000..ef57fe6fd21 --- /dev/null +++ b/test/integration/targets/setup_pexpect/tasks/main.yml @@ -0,0 +1,4 @@ +- name: Install pexpect + pip: + name: pexpect + state: present diff --git a/test/integration/targets/vars_prompt/aliases b/test/integration/targets/vars_prompt/aliases index 765b70da796..02674b52bba 100644 --- a/test/integration/targets/vars_prompt/aliases +++ b/test/integration/targets/vars_prompt/aliases @@ -1 +1,3 @@ +setup/always/setup_passlib +setup/always/setup_pexpect shippable/posix/group2 diff --git a/test/integration/targets/vars_prompt/runme.sh b/test/integration/targets/vars_prompt/runme.sh index 15b72141a41..af5557940eb 100755 --- a/test/integration/targets/vars_prompt/runme.sh +++ b/test/integration/targets/vars_prompt/runme.sh @@ -2,14 +2,5 @@ set -eux -# Install passlib on RHEL and FreeBSD -dist=$(python -c 'import platform; print(platform.dist()[0])') -system=$(python -c 'import platform; print(platform.system())') - -if [[ "$dist" == "redhat" || "$system" == "FreeBSD" ]]; then - pip install passlib -fi - # Interactively test vars_prompt -pip install pexpect python test-vars_prompt.py -i ../../inventory "$@"