From 6b32130ac96b2060fc2ab44e20e109e6820c2f0b Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Thu, 11 Feb 2021 20:29:23 +0100 Subject: [PATCH] fix wrong element spec for rules param in aws_s3_cors (#408) * #404 fix wrong element spec for rules param * #404 documentation fix Co-authored-by: Markus Bergholz --- .../404-fix-dict-element-for-rule-param-in-aws-s3-cors.yml | 2 ++ plugins/modules/aws_s3_cors.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/404-fix-dict-element-for-rule-param-in-aws-s3-cors.yml diff --git a/changelogs/fragments/404-fix-dict-element-for-rule-param-in-aws-s3-cors.yml b/changelogs/fragments/404-fix-dict-element-for-rule-param-in-aws-s3-cors.yml new file mode 100644 index 00000000000..e6eb68bbabd --- /dev/null +++ b/changelogs/fragments/404-fix-dict-element-for-rule-param-in-aws-s3-cors.yml @@ -0,0 +1,2 @@ +bugfixes: +- aws_s3_cors - fix element type for rules parameter. (https://github.com/ansible-collections/community.aws/pull/408). diff --git a/plugins/modules/aws_s3_cors.py b/plugins/modules/aws_s3_cors.py index 820530dc08d..58e33cf1104 100644 --- a/plugins/modules/aws_s3_cors.py +++ b/plugins/modules/aws_s3_cors.py @@ -25,7 +25,7 @@ description: - Cors rules to put on the s3 bucket type: list - elements: str + elements: dict state: description: - Create or remove cors on the s3 bucket @@ -147,7 +147,7 @@ def main(): argument_spec = dict( name=dict(required=True, type='str'), - rules=dict(type='list', elements='str'), + rules=dict(type='list', elements='dict'), state=dict(type='str', choices=['present', 'absent'], required=True) )