-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws_ssm - split S3 region/endpoint discovery into dedicated function
- Loading branch information
Showing
7 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bugfixes: | ||
- aws_ssm - fixes bug with presigned S3 URLs in post-2019 AWS regions (https://github.com/ansible-collections/community.aws/issues/1616). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/integration/targets/connection_aws_ssm_cross_region/aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
time=10m | ||
|
||
cloud/aws | ||
connection_aws_ssm |
10 changes: 10 additions & 0 deletions
10
tests/integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_setup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- hosts: localhost | ||
roles: | ||
- role: ../setup_connection_aws_ssm | ||
vars: | ||
target_os: fedora | ||
s3_bucket_region: 'eu-central-1' | ||
# Post 2019 regions behave differently from other regions | ||
# they're worth testing but it's not possible in CI today. | ||
#s3_bucket_region: 'eu-south-1' | ||
test_suffix: crossregion |
5 changes: 5 additions & 0 deletions
5
...integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_teardown.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- hosts: localhost | ||
tasks: | ||
- include_role: | ||
name: ../setup_connection_aws_ssm | ||
tasks_from: cleanup.yml |
3 changes: 3 additions & 0 deletions
3
tests/integration/targets/connection_aws_ssm_cross_region/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencies: | ||
- connection | ||
- setup_connection_aws_ssm |
31 changes: 31 additions & 0 deletions
31
tests/integration/targets/connection_aws_ssm_cross_region/runme.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
PLAYBOOK_DIR=$(pwd) | ||
set -eux | ||
|
||
CMD_ARGS=("$@") | ||
|
||
# Destroy Environment | ||
cleanup() { | ||
|
||
cd "${PLAYBOOK_DIR}" | ||
ansible-playbook -c local aws_ssm_integration_test_teardown.yml "${CMD_ARGS[@]}" | ||
|
||
} | ||
|
||
trap "cleanup" EXIT | ||
|
||
# Setup Environment | ||
ansible-playbook -c local aws_ssm_integration_test_setup.yml "$@" | ||
|
||
# Export the AWS Keys | ||
set +x | ||
. ./aws-env-vars.sh | ||
set -x | ||
|
||
cd ../connection | ||
|
||
# Execute Integration tests | ||
INVENTORY="${PLAYBOOK_DIR}/ssm_inventory" ./test.sh \ | ||
-e target_hosts=aws_ssm \ | ||
"$@" |