Debian Codegraph @

test/integration/targets/inventory_toml/runme.sh

raw
1 #!/usr/bin/env bash
2
3 set -eux -o pipefail
4
5 source virtualenv.sh
6
7 for toml_library in tomli ""; do
8 if [ "${toml_library}" ]; then
9 pip install --disable-pip-version-check "${toml_library}"
10 fi
11
12 if [ "${ANSIBLE_TEST_PYTHON_VERSION}" = "3.10" ] && [ "${toml_library}" = "" ]; then
13 if ansible-playbook -i inventory.toml playbook.yml "$@"; then
14 echo "passed when it should have failed, is 'toml' or 'tomli' installed globally?"
15 exit 1
16 else
17 echo failed as expected
18 fi
19 else
20 ansible-playbook -i inventory.toml playbook.yml "$@"
21 fi
22
23 if [ "${toml_library}" ]; then
24 pip uninstall --disable-pip-version-check -y "${toml_library}"
25 fi
26 done
27
28 echo "*** TEST PASS ***"