From 2365fddf37d42ddf47cfaaf41baca737290a4f64 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 5 Aug 2020 11:08:43 +0200 Subject: [PATCH] iam_managed_policy: fix json in documentation (#178) --- plugins/modules/iam_managed_policy.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/plugins/modules/iam_managed_policy.py b/plugins/modules/iam_managed_policy.py index 3e5f14a7ddb..3b1adece098 100644 --- a/plugins/modules/iam_managed_policy.py +++ b/plugins/modules/iam_managed_policy.py @@ -79,7 +79,12 @@ - name: Create IAM Managed Policy community.aws.iam_managed_policy: policy_name: "ManagedPolicy" - policy: "{{ lookup('file', 'managed_policy_update.json') }}" + policy: + Version: "2012-10-17" + Statement: + - Effect: "Allow" + Action: "logs:CreateLogGroup" + Resource: "*" make_default: false state: present @@ -87,7 +92,15 @@ - name: Create IAM Managed Policy community.aws.iam_managed_policy: policy_name: "ManagedPolicy" - policy: "{ 'Version': '2012-10-17', 'Statement':[{'Effect': 'Allow','Action': '*','Resource': '*'}]}" + policy: | + { + "Version": "2012-10-17", + "Statement":[{ + "Effect": "Allow", + "Action": "logs:PutRetentionPolicy", + "Resource": "*" + }] + } only_version: true state: present