Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cschimid authored Apr 8, 2024
2 parents d7b5ae9 + a15e50f commit 8959e35
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 106 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ concurrency:
on:
pull_request_target:
types: [opened, synchronize, reopened, closed]

env:
GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}

Expand All @@ -22,6 +21,8 @@ jobs:
intersphinx-links: |
amazon_aws:https://ansible-collections.github.io/amazon.aws/branch/main/
ansible_devel:https://docs.ansible.com/ansible-core/devel/
artifact-name: ${{ github.event.repository.name }}_validate_docs_${{ github.event.pull_request.head.sha }}


build-docs:
permissions:
Expand Down
7 changes: 1 addition & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ community.aws Release Notes

.. contents:: Topics


v7.1.0
======

Expand Down Expand Up @@ -133,7 +134,6 @@ This release brings some new plugins and features. Several bugfixes, breaking ch
The community.aws collection has dropped support for ``botocore<1.25.0`` and ``boto3<1.22.0``.
Support for Python 3.6 has also been dropped.


Minor Changes
-------------

Expand Down Expand Up @@ -206,7 +206,6 @@ Release Summary

This release contains a number of bugfixes for various modules, as well as new features for the ``ec2_launch_template`` and ``msk_cluster`` modules. This is the last planned minor release prior to the release of version 6.0.0.


Minor Changes
-------------

Expand Down Expand Up @@ -302,7 +301,6 @@ modules.
As well as improvements to the ``ecs_cluster``, ``ec2_ecr``,
``ecs_service``, ``iam_role`` and ``ssm_parameter`` plugins.


Minor Changes
-------------

Expand Down Expand Up @@ -368,7 +366,6 @@ Support for ``ansible-core<2.11`` has also been dropped.

This release also brings some new features, bugfixes, breaking changes and deprecated features.


Minor Changes
-------------

Expand Down Expand Up @@ -530,7 +527,6 @@ Release Summary

This release contains a minor bugfix for the ``sns_topic`` module as well as corrections to the documentation for various modules. This is the last planned release of the 4.x series.


Bugfixes
--------

Expand Down Expand Up @@ -888,7 +884,6 @@ Release Summary

Following the release of community.aws 5.0.0, 3.6.0 is a bugfix release and the final planned release for the 3.x series.


Minor Changes
-------------

Expand Down
21 changes: 21 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3734,3 +3734,24 @@ releases:
- release.yml
- ssm-fedora34.yml
release_date: '2024-01-10'
7.2.0:
changes:
bugfixes:
- ssm(connection) - fix bucket region logic when region is ``us-east-1`` (https://github.com/ansible-collections/community.aws/pull/1908).
minor_changes:
- glue_job - add support for 2 new instance types which are G.4X and G.8X (https://github.com/ansible-collections/community.aws/pull/2048).
- msk_cluster - Support for additional ``m5`` and ``m7g`` types of MSK clusters
(https://github.com/ansible-collections/community.aws/pull/1947).
release_summary: This release includes a new module ``dynamodb_table_info``,
new features for the ``glue_job`` and ``msk_cluster`` modules, and a bugfix
for the ``aws_ssm`` connection plugin.
fragments:
- 1908-fix_find_out_bucket_region_logic.yml
- 1947-add_support_msk_addtinal_type.yml
- 20240402-lambda-test-runtime.yml
- 2048-add-new-instance-types-in-gluejob.yaml
modules:
- description: Returns information about a Dynamo DB table
name: dynamodb_table_info
namespace: ''
release_date: '2024-04-05'

This file was deleted.

2 changes: 0 additions & 2 deletions changelogs/fragments/1947-add_support_msk_addtinal_type.yml

This file was deleted.

2 changes: 2 additions & 0 deletions changelogs/fragments/20240408-efs-sanity_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- efs - Use ``yield from`` in ordr to fix sanity errors.

This file was deleted.

3 changes: 1 addition & 2 deletions plugins/modules/efs.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,7 @@ def iterate_all(attr, map_method, **kwargs):
while True:
try:
data = map_method(**args)
for elm in data[attr]:
yield elm
yield from data[attr]
if "NextMarker" in data:
args["Marker"] = data["Nextmarker"]
continue
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/targets/config/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
config_recorder:
name: '{{ resource_prefix }}-recorder'
state: present
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
recording_group:
all_supported: true
include_global_types: true
Expand Down Expand Up @@ -236,7 +236,7 @@
account_sources: []
organization_source:
all_aws_regions: true
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
register: output

- name: assert success
Expand All @@ -251,7 +251,7 @@
account_sources: []
organization_source:
all_aws_regions: true
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
register: output

- name: assert not changed
Expand All @@ -266,7 +266,7 @@
config_recorder:
name: '{{ resource_prefix }}-recorder'
state: present
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
recording_group:
all_supported: false
include_global_types: false
Expand Down Expand Up @@ -348,7 +348,7 @@
all_aws_regions: false
aws_regions:
- '{{ aws_region }}'
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
register: output

- name: assert success
Expand All @@ -365,7 +365,7 @@
all_aws_regions: false
aws_regions:
- '{{ aws_region }}'
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
register: output

- name: assert success
Expand All @@ -380,7 +380,7 @@
config_recorder:
name: '{{ resource_prefix }}-recorder'
state: present
role_arn: "{{ config_iam_role.arn }}"
role_arn: "{{ config_iam_role.iam_role.arn }}"
recording_group:
all_supported: false
include_global_types: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

- assert:
that:
- 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")'

- name: Create template again, with no change to instance_role
ec2_launch_template:
Expand All @@ -41,7 +41,7 @@

- assert:
that:
- 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_role is not changed'

- name: Update instance with new instance_role
Expand All @@ -54,8 +54,8 @@

- assert:
that:
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_role.default_template.version_number < template_with_updated_role.default_template.version_number'
- 'template_with_updated_role is changed'
- 'template_with_updated_role is not failed'
Expand All @@ -71,21 +71,21 @@
- assert:
that:
- 'template_with_updated_role is not changed'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")'

- name: Update instance with original instance_role (pass profile ARN)
ec2_launch_template:
name: "{{ resource_prefix }}-test-instance-role"
image_id: "{{ ec2_ami_id }}"
instance_type: t2.micro
# By default an instance profile will be created with the same name as the role
iam_instance_profile: '{{ iam_role.arn.replace(":role/", ":instance-profile/") }}'
iam_instance_profile: '{{ iam_role.iam_role.arn.replace(":role/", ":instance-profile/") }}'
register: template_with_updated_role

- assert:
that:
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_role.default_template.version_number < template_with_updated_role.default_template.version_number'
- 'template_with_updated_role is changed'
- 'template_with_updated_role is not failed'
Expand All @@ -95,13 +95,13 @@
name: "{{ resource_prefix }}-test-instance-role"
image_id: "{{ ec2_ami_id }}"
instance_type: t2.micro
iam_instance_profile: '{{ iam_role.arn.replace(":role/", ":instance-profile/") }}'
iam_instance_profile: '{{ iam_role.iam_role.arn.replace(":role/", ":instance-profile/") }}'
register: template_with_updated_role

- assert:
that:
- 'template_with_updated_role is not changed'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")'
- 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")'

always:
- name: delete launch template
Expand Down
16 changes: 8 additions & 8 deletions tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,17 +547,17 @@
>> "rolloutStateReason": "ECS deployment ecs-svc/5156684577543126023 in progress.",
constraints and placement strategies are only changeable if the rollout state is "COMPLETED"
a) ecs_service has currently no waiter function. so this is a DIY waiter
b) the state reached never "COMPLETED" because something if wrong with the ECS EC2 Instances
or the network setup. The EC2 instance never arrived as an active instance in the cluster.
>> no container instance met all of its requirements. Reason: No Container Instances were found in your cluster.
>> For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.
>> ec2_instance networking does not work correctly, no instance available for the cluster
Because all of this, all following tasks, that test the change of a constraint or placement stragegy are
using `force_new_deployment: true`. That ignores a) and b).
using `force_new_deployment: true`. That ignores a) and b).
ignore_errors: true
ecs_service_info:
name: "{{ ecs_service_name }}-constraint"
Expand Down Expand Up @@ -736,7 +736,7 @@
launch_type: FARGATE
cpu: 512
memory: 1024
execution_role_arn: "{{ iam_execution_role.arn }}"
execution_role_arn: "{{ iam_execution_role.iam_role.arn }}"
state: present
vars:
ecs_task_host_port: 8080
Expand All @@ -750,7 +750,7 @@
launch_type: EC2
cpu: 512
memory: 1024
execution_role_arn: "{{ iam_execution_role.arn }}"
execution_role_arn: "{{ iam_execution_role.iam_role.arn }}"
state: present
vars:
ecs_task_host_port: 8080
Expand Down Expand Up @@ -916,7 +916,7 @@
launch_type: FARGATE
cpu: 512
memory: 1024
execution_role_arn: "{{ iam_execution_role.arn }}"
execution_role_arn: "{{ iam_execution_role.iam_role.arn }}"
state: present
runtime_platform:
cpuArchitecture: "ARM64"
Expand All @@ -938,7 +938,7 @@
launch_type: FARGATE
cpu: 512
memory: 1024
execution_role_arn: "{{ iam_execution_role.arn }}"
execution_role_arn: "{{ iam_execution_role.iam_role.arn }}"
state: present
runtime_platform:
cpuArchitecture: "ARM64"
Expand All @@ -960,7 +960,7 @@
launch_type: FARGATE
cpu: 512
memory: 1024
execution_role_arn: "{{ iam_execution_role.arn }}"
execution_role_arn: "{{ iam_execution_role.iam_role.arn }}"
state: present
runtime_platform:
cpuArchitecture: "ARM64"
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/targets/eks_cluster/tasks/full_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
name: "{{ eks_cluster_name }}"
security_groups: "{{ eks_security_groups | map(attribute='name') }}"
subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}"
role_arn: "{{ iam_role.arn }}"
role_arn: "{{ iam_role.iam_role.arn }}"
tags:
Name: "{{ resource_prefix }}"
another: foobar
Expand All @@ -97,7 +97,7 @@
name: "{{ eks_cluster_name }}"
security_groups: "{{ eks_security_groups | map(attribute='name') }}"
subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}"
role_arn: "{{ iam_role.arn }}"
role_arn: "{{ iam_role.iam_role.arn }}"
wait: yes
register: eks_create

Expand All @@ -117,7 +117,7 @@
name: "{{ eks_cluster_name }}"
security_groups: "{{ setup_security_groups.results | map(attribute='group_id') }}"
subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}"
role_arn: "{{ iam_role.arn }}"
role_arn: "{{ iam_role.iam_role.arn }}"
register: eks_create

- name: check that EKS cluster did not change
Expand All @@ -143,7 +143,7 @@
name: "{{ eks_cluster_name }}"
security_groups: "{{ eks_security_groups | map(attribute='name') }}"
subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}"
role_arn: "{{ iam_role.arn }}"
role_arn: "{{ iam_role.iam_role.arn }}"
wait: yes
register: eks_create

Expand All @@ -169,7 +169,7 @@
name: "{{ eks_cluster_short_name }}"
security_groups: "{{ eks_security_groups | map(attribute='name') }}"
subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}"
role_arn: "{{ iam_role.arn }}"
role_arn: "{{ iam_role.iam_role.arn }}"
register: eks_create

- name: check that EKS cluster was created with short name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
name: '{{ eks_cluster_name }}'
security_groups: '{{ eks_security_groups | map(attribute=''name'') }}'
subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}'
role_arn: '{{ iam_role.arn }}'
role_arn: '{{ iam_role.iam_role.arn }}'
wait: true
register: eks_create

Expand Down
Loading

0 comments on commit 8959e35

Please sign in to comment.