Skip to content

Commit

Permalink
Update Examples with FQCN (ansible-collections#67)
Browse files Browse the repository at this point in the history
Updated module examples with FQCN

Signed-off-by: Abhijeet Kasurde <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@98173ae
  • Loading branch information
Akasurde authored and alinabuzachis committed Oct 6, 2023
1 parent 5429b4e commit 5994509
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions plugins/modules/iam_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
managed_policies:
description:
- A list of managed policy ARNs or friendly names to attach to the role.
- To embed an inline policy, use M(iam_policy).
- To embed an inline policy, use M(community.aws.iam_policy).
required: false
type: list
elements: str
Expand Down Expand Up @@ -76,20 +76,20 @@
EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Create a group
- iam_group:
- name: Create a group
community.aws.iam_group:
name: testgroup1
state: present
# Create a group and attach a managed policy using its ARN
- iam_group:
- name: Create a group and attach a managed policy using its ARN
community.aws.iam_group:
name: testgroup1
managed_policies:
- arn:aws:iam::aws:policy/AmazonSNSFullAccess
state: present
# Create a group with users as members and attach a managed policy using its ARN
- iam_group:
- name: Create a group with users as members and attach a managed policy using its ARN
community.aws.iam_group:
name: testgroup1
managed_policies:
- arn:aws:iam::aws:policy/AmazonSNSFullAccess
Expand All @@ -98,23 +98,22 @@
- test_user2
state: present
# Remove all managed policies from an existing group with an empty list
- iam_group:
- name: Remove all managed policies from an existing group with an empty list
community.aws.iam_group:
name: testgroup1
state: present
purge_policies: true
# Remove all group members from an existing group
- iam_group:
- name: Remove all group members from an existing group
community.aws.iam_group:
name: testgroup1
managed_policies:
- arn:aws:iam::aws:policy/AmazonSNSFullAccess
purge_users: true
state: present
# Delete the group
- iam_group:
- name: Delete the group
community.aws.iam_group:
name: testgroup1
state: absent
Expand Down

0 comments on commit 5994509

Please sign in to comment.