summaryrefslogtreecommitdiff
path: root/test/integration/targets/fetch
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2021-09-20 18:39:07 -0700
committerGitHub <noreply@github.com>2021-09-20 18:39:07 -0700
commit4ea8d9a7824827cf3d4a206599ffd7fe3a09eafd (patch)
tree57b4ea491f6f93b6b938037e28dca90098754ca2 /test/integration/targets/fetch
parent989eeb243fcf9236bd54d4df60c01f6db4e642a7 (diff)
downloadansible-4ea8d9a7824827cf3d4a206599ffd7fe3a09eafd.tar.gz
ansible-test - split controller/target testing (#75605)
Diffstat (limited to 'test/integration/targets/fetch')
-rw-r--r--test/integration/targets/fetch/aliases1
-rw-r--r--test/integration/targets/fetch/hosts.yml8
-rwxr-xr-xtest/integration/targets/fetch/runme.sh6
3 files changed, 4 insertions, 11 deletions
diff --git a/test/integration/targets/fetch/aliases b/test/integration/targets/fetch/aliases
index fb5d6faa35..ff56593df1 100644
--- a/test/integration/targets/fetch/aliases
+++ b/test/integration/targets/fetch/aliases
@@ -1,2 +1,3 @@
shippable/posix/group2
needs/target/setup_remote_tmp_dir
+needs/ssh
diff --git a/test/integration/targets/fetch/hosts.yml b/test/integration/targets/fetch/hosts.yml
deleted file mode 100644
index 8465ef166c..0000000000
--- a/test/integration/targets/fetch/hosts.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-all:
- hosts:
- testhost:
- ansible_host: localhost
- ansible_connection: ssh
- ansible_python_interpreter: "{{ ansible_playbook_python }}"
- ansible_host_key_checking: no
- ansible_ssh_common_args: -o UserKnownHostsFile={{ output_dir }}/known_hosts -o StrictHostKeyChecking=no
diff --git a/test/integration/targets/fetch/runme.sh b/test/integration/targets/fetch/runme.sh
index 6a9bfa9902..a508a0a672 100755
--- a/test/integration/targets/fetch/runme.sh
+++ b/test/integration/targets/fetch/runme.sh
@@ -3,7 +3,7 @@
set -eux
function cleanup {
- ansible-playbook -i hosts.yml cleanup.yml -e "output_dir=${OUTPUT_DIR}" -b "$@"
+ ansible-playbook -i "${INVENTORY_PATH}" cleanup.yml -e "output_dir=${OUTPUT_DIR}" -b "$@"
unset ANSIBLE_CACHE_PLUGIN
unset ANSIBLE_CACHE_PLUGIN_CONNECTION
}
@@ -28,7 +28,7 @@ ansible-playbook -i ../../inventory injection/avoid_slurp_return.yml -e "output_
export ANSIBLE_CACHE_PLUGIN=jsonfile
export ANSIBLE_CACHE_PLUGIN_CONNECTION="${OUTPUT_DIR}/cache"
# Create a non-root user account and configure SSH acccess for that account
-ansible-playbook -i hosts.yml setup_unreadable_test.yml -e "output_dir=${OUTPUT_DIR}" "$@"
+ansible-playbook -i "${INVENTORY_PATH}" setup_unreadable_test.yml -e "output_dir=${OUTPUT_DIR}" "$@"
# Run the tests as the unprivileged user without become to test the use of the stat module from the fetch module
-ansible-playbook --user fetcher -i hosts.yml test_unreadable_with_stat.yml -e "output_dir=${OUTPUT_DIR}" "$@"
+ansible-playbook -i "${INVENTORY_PATH}" test_unreadable_with_stat.yml -e ansible_user=fetcher -e ansible_become=no -e "output_dir=${OUTPUT_DIR}" "$@"