Skip to content

Commit

Permalink
ssm connection plugin - Replace Fedora tests with CentOS 9 (#1793)
Browse files Browse the repository at this point in the history
ssm connection plugin - Replace Fedora tests with CentOS 9

SUMMARY
Applies black to the SSM connection plugin
Fedora 34 AMIs aren't available for integration tests any more, move over to CentOS 9 because Fedora Images will keep going away.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
Reviewed-by: Markus Bergholz <[email protected]>
  • Loading branch information
tremble authored Jan 3, 2024
1 parent e5a41df commit e5ea29e
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 20 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/ssm-fedora34.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- ssm - bump test image from Fedora 34 to CentOS 9
6 changes: 3 additions & 3 deletions plugins/connection/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
- Files sent via S3 will be named in S3 with the EC2 host ID (e.g. C(i-123abc/)) as the prefix.
- The files in S3 will be deleted by the end of the playbook run. If the play is terminated ungracefully, the files may remain in the bucket.
If the bucket has versioning enabled, the files will remain in version history. If your tasks involve sending secrets to/from the remote instance
(e.g. within a C(shell) command, or a SQL password in the C(community.postgresql.postgresql_query) module) then those passwords will be included in plaintext in those files in S3 indefinitely,
visible to anyone with access to that bucket. Therefore it is recommended to use a bucket with versioning disabled/suspended.
(e.g. within a C(shell) command, or a SQL password in the C(community.postgresql.postgresql_query) module) then those passwords will be included in
plaintext in those files in S3 indefinitely, visible to anyone with access to that bucket. Therefore it is recommended to use a bucket with versioning
disabled/suspended.
- The files in S3 will be deleted even if the C(keep_remote_files) setting is C(true).
requirements:
Expand Down Expand Up @@ -144,7 +145,6 @@
"""

EXAMPLES = r"""
# Wait for SSM Agent to be available on the Instance
- name: Wait for connection to be available
vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
encrypted_bucket: False
s3_bucket_region: 'eu-central-1'
s3_addressing_style: virtual
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
encrypted_bucket: True
test_suffix: encrypteds3
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
test_suffix: endpoint
endpoint_url: 'https://s3.dualstack.{{ aws_region }}.amazonaws.com'
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
profile_name: test_profile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
use_ssm_document: True
test_suffix: document
1 change: 0 additions & 1 deletion tests/integration/targets/connection_aws_ssm_vars/aliases
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

disabled
cloud/aws
connection_aws_ssm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
roles:
- role: ../setup_connection_aws_ssm
vars:
target_os: fedora
target_os: centos
credential_vars: True
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ instance_type: t3.micro
ami_details:
fedora:
owner: 125523088429
name: Fedora-Cloud-Base-34-1.2.x86_64*
name: 'Fedora-Cloud-Base-41-1.2.x86_64*'
user_data: |
#!/bin/sh
sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
sudo systemctl start amazon-ssm-agent
os_type: linux
centos:
owner: 125523088429
name: 'CentOS Stream 9 x86_64*'
user_data: |
#!/bin/sh
sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
Expand Down

0 comments on commit e5ea29e

Please sign in to comment.