Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/test_a_module/runme.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 source virtualenv.sh
9
10 # The collection loader ignores paths which have more than one ansible_collections in it.
11 # That's why we have to copy this directory to a temporary place and run the test there.
12
13 # Create temporary folder
14 TEMPDIR=$(mktemp -d)
15 trap '{ rm -rf ${TEMPDIR}; }' EXIT
16
17 cp -r . "${TEMPDIR}"
18 cd "${TEMPDIR}"
19
20 ansible-playbook runme.yml "$@"