forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flag aws_ssm as unstable rather than disabled (ansible-collections#295)
* Flag aws_ssm as unstable rather than disabled * Try tweaking the policy * no security_token * Use module_defaults rather than fact hack * Fix session token env var * Move bucket creation to avoid aws-terminator whacking it. * Change the order of Instance creation, Windows takes longer to start. * Add reset call to aws_ssm * Add a wait_for_connection call at the start of the connection tests. Reduce the delay waiting on the EC2 instances * Explicitly call community.aws.aws_ssm - looks like 2.9 isn't redirecting properly * Try running SSM connection tests in parallel. * Delay a little more * Turn file names into a variable, and make sure they're unique to the host. * Try bumping up the instance size * More delays... * Remove unused imports * Move botocore import into HAS_BOTO3 try block * Make sure that path_unescaped initial string is unicode because out_path can be * Don't wait for the Windows VM before starting the Linux one * Add a note why the test is 'unstable' * Use EBS optimized volumes to improve Windows boot speed. * Try disabling the Windows connection test - Windows is very slow to start * instances sometimes isn't there if the host took to long to start, use instance_ids * changelog * Remove duplicate wait * Move to more modern instance type * Don't try installing boto, it's already available in the images * remove debugging * Remove old (unused) inventory templates * Add comment
- Loading branch information
Showing
15 changed files
with
99 additions
and
114 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 - fixed ``UnicodeEncodeError`` error when using unicode file names (https://github.com/ansible-collections/community.aws/pull/295). |
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
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
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: 2 additions & 2 deletions
4
...s/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/defaults/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
instance_type: t2.micro | ||
linux_ami_name: amzn-ami-hvm-2018.03.0.20190611-x86_64-ebs | ||
instance_type: t3.micro | ||
linux_ami_name: amzn-ami-hvm-2018.03*x86_64-ebs | ||
# Windows AMIs get replaced every few months, don't be too specific | ||
windows_ami_name: Windows_Server-2019-English-Full-Base-* |
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: 3 additions & 1 deletion
4
...ation/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/aws-env-vars.j2
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export AWS_ACCESS_KEY_ID={{aws_access_key}} | ||
export AWS_SECRET_ACCESS_KEY={{aws_secret_key}} | ||
export AWS_SECURITY_TOKEN={{security_token}} | ||
{% if security_token is defined %} | ||
export AWS_SESSION_TOKEN={{security_token}} | ||
{% endif %} | ||
export AWS_REGION={{aws_region}} |
2 changes: 1 addition & 1 deletion
2
...nnection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_linux_vars_to_delete.yml.j2
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
linux_instance_id: {{ linux_output.instances[0].instance_id }} | ||
linux_instance_id: {{ linux_output.instance_ids[0] }} |
2 changes: 1 addition & 1 deletion
2
...ection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_windows_vars_to_delete.yml.j2
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
windows_instance_id: {{ windows_output.instances[0].instance_id }} | ||
windows_instance_id: {{ windows_output.instance_ids[0] }} |
30 changes: 30 additions & 0 deletions
30
...connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
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,30 @@ | ||
[aws_ssm_linux] | ||
linux_{{linux_output.instance_ids[0]}} ansible_aws_ssm_instance_id={{linux_output.instance_ids[0]}} ansible_aws_ssm_region={{aws_region}} | ||
|
||
[aws_ssm_linux:vars] | ||
remote_tmp=/tmp/ansible-remote | ||
action_prefix= | ||
|
||
[aws_ssm_windows] | ||
windows_{{windows_output.instance_ids[0]}} ansible_aws_ssm_instance_id={{windows_output.instance_ids[0]}} ansible_aws_ssm_region={{aws_region}} | ||
|
||
[aws_ssm_windows:vars] | ||
ansible_shell_type=powershell | ||
remote_tmp=c:/windows/temp/ansible-remote | ||
action_prefix=win_ | ||
|
||
[aws_ssm:children] | ||
aws_ssm_linux | ||
## To run the connection test uncomment here | ||
# aws_ssm_windows | ||
|
||
[aws_ssm:vars] | ||
ansible_connection=community.aws.aws_ssm | ||
ansible_aws_ssm_bucket_name={{s3_output.name}} | ||
ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin | ||
ansible_python_interpreter=/usr/bin/env python | ||
local_tmp=/tmp/ansible-local- | ||
|
||
# support tests that target testhost | ||
[testhost:children] | ||
aws_ssm |
12 changes: 0 additions & 12 deletions
12
...ts/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-linux.aws_ssm.j2
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.../connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-windows.aws_ssm.j2
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
tests/integration/targets/connection_aws_ssm/inventory.aws_ssm.template
This file was deleted.
Oops, something went wrong.
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
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