Debian Codegraph @

ansible_collections/community/docker/tests/integration/targets/connection_docker/runme-connection.sh

raw
1 #!/usr/bin/env bash
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 set -eux
7
8 # Connection tests for POSIX platforms use this script by linking to it from the appropriate 'connection_' target dir.
9 # The name of the inventory group to test is extracted from the directory name following the 'connection_' prefix.
10
11 PYTHON="$(command -v python3 python | head -n1)"
12
13 group=$(${PYTHON} -c \
14 "from os import path; print(path.basename(path.abspath(path.dirname('$0'))).replace('connection_', ''))")
15
16 cd ../connection
17
18 INVENTORY="../connection_${group}/test_connection.inventory" ./test.sh \
19 -e target_hosts="${group}" \
20 -e action_prefix= \
21 -e local_tmp=/tmp/ansible-local \
22 -e remote_tmp=/tmp/ansible-remote \
23 "$@"