Debian Codegraph @

ansible_collections/containers/podman/tests/integration/targets/connection_podman/runme.sh

raw
1 #!/usr/bin/env bash
2
3 set -o pipefail
4 set -eux
5
6 function run_ansible {
7 ${SUDO:-} ${ANSIBLECMD:-ansible-playbook} ../connection/test_connection.yml -i "test_connection.inventory" \
8 -e target_hosts="podman" \
9 -e action_prefix= \
10 -e local_tmp=/tmp/ansible-local \
11 -e remote_tmp=/tmp/ansible-remote \
12 "$@"
13
14 }
15
16 run_ansible "$@"
17 LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 run_ansible "$@"
18 ANSIBLE_VERBOSITY=4 ANSIBLE_REMOTE_TMP="/tmp" ANSIBLE_REMOTE_USER="1000" run_ansible "$@" | tee check_log
19 ${SUDO:-} grep -q "Using podman connection from collection" check_log
20 ${SUDO:-} rm -f check_log
21 set +o pipefail
22 ANSIBLE_PODMAN_EXECUTABLE=fakepodman run_ansible "$@" 2>&1 | grep "Could not find fakepodman in PATH"
23 set -o pipefail
24 ANSIBLE_PODMAN_EXECUTABLE=fakepodman run_ansible "$@" && {
25 echo "Playbook with fakepodman should fail!"
26 exit 1
27 }
28 ANSIBLE_VERBOSITY=4 ANSIBLE_PODMAN_EXTRA_ARGS=" --log-level debug " run_ansible "$@" | grep "level=debug msg="