diff --git a/tests/integration/targets/test_playbook_webapp/create_aws_credentials.yml b/tests/integration/targets/test_playbook_webapp/create_aws_credentials.yml deleted file mode 100644 index ba5841b..0000000 --- a/tests/integration/targets/test_playbook_webapp/create_aws_credentials.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: localhost - connection: local - gather_facts: false - tasks: - - name: Write access key to file we can source - ansible.builtin.copy: - dest: access_key.sh - content: | - export AWS_ACCESS_KEY_ID="{{ aws_access_key }}" - export AWS_SECRET_ACCESS_KEY="{{ aws_secret_key }}" - export AWS_REGION="{{ aws_region }}" - export AWS_SECURITY_TOKEN="{{ aws_security_token }}" diff --git a/tests/integration/targets/test_playbook_webapp/runme.sh b/tests/integration/targets/test_playbook_webapp/runme.sh index cf7f3c7..fbb2949 100755 --- a/tests/integration/targets/test_playbook_webapp/runme.sh +++ b/tests/integration/targets/test_playbook_webapp/runme.sh @@ -1,23 +1,16 @@ #!/usr/bin/env bash -# generate inventory with access_key provided through a templated variable -ansible-playbook create_aws_credentials.yml "$@" -source access_key.sh - set -eux function cleanup() { - set +x - source access_key.sh - set -x - ansible-playbook webapp.yaml -e "operation=delete" "$@" + ansible-playbook test_webapp.yaml -e "operation=delete" "$@" exit 1 } trap 'cleanup "${@}"' ERR # Create web application -ansible-playbook webapp.yaml "$@" +ansible-playbook test_webapp.yaml "$@" # Delete web application -ansible-playbook webapp.yaml -e "operation=delete" "$@" \ No newline at end of file +ansible-playbook test_webapp.yaml -e "operation=delete" "$@" \ No newline at end of file