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 abikouo committed Sep 18, 2023
1 parent d45213f commit 12ed339
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions 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 12ed339

Please sign in to comment.