Skip to content

Commit dba73bb

Browse files
authored
Update collection for a 4.0.0 release (#17)
* Update the collection version to 4.0.0. * Use Python 3.12 for testing. * Use `ansible-core` 2.16.5 for testing. * Update `amazon.aws` dependency to version 7.x. * Use `amazon.aws.iam_role` instead of `community.aws.iam_role` for testing. * Drop `community.aws` test dependency. * Fix module defaults in documentation. * Fix test assertions to not use templates. * Update `distlib` test dependency to version 0.3.8.
1 parent 3d16c42 commit dba73bb

File tree

16 files changed

+35
-31
lines changed

16 files changed

+35
-31
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pool:
1818
steps:
1919
- task: UsePythonVersion@0
2020
inputs:
21-
versionSpec: '3.9'
21+
versionSpec: '3.12'
2222
displayName: Install Python
2323
- checkout: self
2424
path: ansible_collections/mattclay/aws

galaxy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace: mattclay
99
name: aws
1010

1111
# The version of the collection. Must be compatible with semantic versioning
12-
version: 3.0.0
12+
version: 4.0.0
1313

1414
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1515
readme: README.md
@@ -45,7 +45,7 @@ tags:
4545
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
4646
# range specifiers can be set and are separated by ','
4747
dependencies:
48-
amazon.aws: '>=5.0.0,<6.0.0'
48+
amazon.aws: '>=7.0.0,<8.0.0'
4949

5050
# The URL of the originating SCM repository
5151
repository: https://github.com/mattclay/ansible-collection-aws

meta/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ action_groups:
1414
- sqs_event
1515
- sqs_fifo_queue
1616
# external collections
17-
- community.aws.iam_role
17+
- amazon.aws.iam_role

plugins/modules/apigateway.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@
4343
description:
4444
- The stage description used for deployment.
4545
type: str
46+
default: ''
4647
deployment_description:
4748
description:
4849
- The deployment description used for deployment.
4950
type: str
51+
default: ''
5052
mode:
5153
description:
5254
- If C(merge) the specification will be merged into the existing API.
@@ -65,6 +67,7 @@
6567
description:
6668
- Stage variables to include in the deployment.
6769
type: dict
70+
default: {}
6871
extends_documentation_fragment:
6972
- amazon.aws.aws
7073
- amazon.aws.ec2

plugins/modules/cloudwatch_event.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
description:
3434
- Description of the rule.
3535
type: str
36+
default: ''
3637
state:
3738
description:
3839
- If C(enabled) the rule will exist and be enabled.

plugins/modules/lambda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
description:
6464
- The description of the Lambda function.
6565
type: str
66+
default: ''
6667
timeout:
6768
description:
6869
- The timeout (in minutes) for execution of the Lambda function.

plugins/modules/lambda_alias.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
description:
4343
- The description of the alias.
4444
type: str
45+
default: ''
4546
extends_documentation_fragment:
4647
- amazon.aws.aws
4748
- amazon.aws.ec2
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
- name: Test dictfilter filter
22
assert:
33
that:
4-
- '{{ {} | mattclay.aws.dictfilter([]) == {} }}'
5-
- '{{ {} | mattclay.aws.dictfilter(["a"]) == {} }}'
6-
- '{{ {"a": 1} | mattclay.aws.dictfilter(["a"]) == {"a": 1} }}'
7-
- '{{ {"a": 1, "b": 2} | mattclay.aws.dictfilter(["a"]) == {"a": 1} }}'
8-
- '{{ {"a": 1, "b": 2} | mattclay.aws.dictfilter(["a", "b"]) == {"a": 1, "b": 2} }}'
9-
- '{{ {"a": 1, "b": 2} | mattclay.aws.dictfilter(["c"]) == {} }}'
4+
- '{} | mattclay.aws.dictfilter([]) == {}'
5+
- '{} | mattclay.aws.dictfilter(["a"]) == {}'
6+
- '{"a": 1} | mattclay.aws.dictfilter(["a"]) == {"a": 1}'
7+
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["a"]) == {"a": 1}'
8+
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["a", "b"]) == {"a": 1, "b": 2}'
9+
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["c"]) == {}'
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- name: Test ec2_az_vpc_route_tables_subnets filter
22
assert:
33
that:
4-
- '{{ {"us-east-1a": {}, "us-east-1b": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") ==
5-
["192.168.0.0/24", "192.168.1.0/24"] }}'
6-
- '{{ {"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") ==
7-
["192.168.5.0/24"] }}'
4+
- '{"us-east-1a": {}, "us-east-1b": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") ==
5+
["192.168.0.0/24", "192.168.1.0/24"]'
6+
- '{"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") ==
7+
["192.168.5.0/24"]'
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- name: Test ec2_az_vpc_subnets filter
22
assert:
33
that:
4-
- '{{ {"us-east-1a": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") ==
5-
[{ "az": "us-east-1a", "cidr": "192.168.0.0/24", "resource_tags": {"Name": "Bob"}}] }}'
6-
- '{{ {"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") ==
7-
[{ "az": "us-east-1f", "cidr": "192.168.5.0/24", "resource_tags": {"Name": "Bob"}}] }}'
4+
- '{"us-east-1a": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") ==
5+
[{ "az": "us-east-1a", "cidr": "192.168.0.0/24", "resource_tags": {"Name": "Bob"}}]'
6+
- '{"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") ==
7+
[{ "az": "us-east-1f", "cidr": "192.168.5.0/24", "resource_tags": {"Name": "Bob"}}]'
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- name: Test map_format filter
22
assert:
33
that:
4-
- '{{ {} | mattclay.aws.map_format("Hello") == "Hello" }}'
5-
- '{{ {"age": 21} | mattclay.aws.map_format("Hello {name} {age}", name="Bob") == "Hello Bob 21" }}'
6-
- '{{ {"name": "World"} | mattclay.aws.map_format("Hello {name}") == "Hello World" }}'
7-
- '{{ {"name": "World"} | mattclay.aws.map_format("Hello {name}", name="Bob") == "Hello Bob" }}'
8-
- '{{ {"name": "World"} | mattclay.aws.map_format("Hello {name} {0}", 3) == "Hello World 3" }}'
4+
- '{} | mattclay.aws.map_format("Hello") == "Hello"'
5+
- '{"age": 21} | mattclay.aws.map_format("Hello {name} {age}", name="Bob") == "Hello Bob 21"'
6+
- '{"name": "World"} | mattclay.aws.map_format("Hello {name}") == "Hello World"'
7+
- '{"name": "World"} | mattclay.aws.map_format("Hello {name}", name="Bob") == "Hello Bob"'
8+
- '{"name": "World"} | mattclay.aws.map_format("Hello {name} {0}", 3) == "Hello World 3"'

tests/integration/targets/lambda/tasks/setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Create a role
2-
community.aws.iam_role:
2+
amazon.aws.iam_role:
33
name: "{{ iam_role_name }}"
44
assume_role_policy_document:
55
Version: '2012-10-17'

tests/integration/targets/lambda_alias/tasks/setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Create a role
2-
community.aws.iam_role:
2+
amazon.aws.iam_role:
33
name: "{{ iam_role_name }}"
44
assume_role_policy_document:
55
Version: '2012-10-17'

tests/integration/targets/sqs_event/tasks/setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Create a role
2-
community.aws.iam_role:
2+
amazon.aws.iam_role:
33
name: "{{ iam_role_name }}"
44
assume_role_policy_document:
55
Version: '2012-10-17'

tests/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ansible-core==2.14.2
2-
distlib==0.3.6
1+
ansible-core==2.16.5
2+
distlib==0.3.8

tests/requirements.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
collections:
2-
- name: community.aws
3-
version: '>=5.0.0,<6.0.0'
42
- name: amazon.aws
5-
version: '>=5.0.0,<6.0.0'
3+
version: '>=7.0.0,<8.0.0'

0 commit comments

Comments
 (0)