Debian Codegraph @

ansible_collections/amazon/aws/tests/integration/targets/connection_aws_ssm_centos/runme.sh

raw
1 #!/usr/bin/env bash
2
3 PLAYBOOK_DIR=$(pwd)
4 set -eux
5
6 CMD_ARGS=("$@")
7
8 # Destroy Environment
9 cleanup() {
10
11 cd "${PLAYBOOK_DIR}"
12 ansible-playbook -c local aws_ssm_integration_test_teardown.yml "${CMD_ARGS[@]}"
13
14 }
15
16 trap "cleanup" EXIT
17
18 # Setup Environment
19 ansible-playbook -c local aws_ssm_integration_test_setup.yml "$@"
20
21 # Export the AWS Keys
22 set +x
23 . ./aws-env-vars.sh
24 set -x
25
26 cd ../connection
27
28 # Execute Integration tests
29 INVENTORY="${PLAYBOOK_DIR}/ssm_inventory" ./test.sh \
30 -e target_hosts=aws_ssm \
31 "$@"