Skip to content

Commit

Permalink
iam_managed_policy: fix json in documentation (ansible-collections#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble authored and alinabuzachis committed Oct 6, 2023
1 parent f2f9f30 commit 06cb45d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions plugins/modules/iam_managed_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,28 @@
- 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
# Update a policy and make it the only version and the default version
- 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
Expand Down

0 comments on commit 06cb45d

Please sign in to comment.