diff --git a/plugins/modules/iam_group.py b/plugins/modules/iam_group.py index cedf41613eb..9dc43ec0a94 100644 --- a/plugins/modules/iam_group.py +++ b/plugins/modules/iam_group.py @@ -1,24 +1,10 @@ #!/usr/bin/python -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -from __future__ import absolute_import, division, print_function -__metaclass__ = type - - -DOCUMENTATION = r''' +# -*- coding: utf-8 -*- + +# Copyright: Contributors to the Ansible project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +DOCUMENTATION = r""" --- module: iam_group version_added: 1.0.0 @@ -26,8 +12,8 @@ description: - Manage AWS IAM groups. author: -- Nick Aslanidis (@naslanidis) -- Maksym Postument (@infectsoldier) + - Nick Aslanidis (@naslanidis) + - Maksym Postument (@infectsoldier) options: name: description: @@ -70,12 +56,12 @@ default: false type: bool extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 -- amazon.aws.boto3 -''' + - amazon.aws.common.modules + - amazon.aws.region.modules + - amazon.aws.boto3 +""" -EXAMPLES = r''' +EXAMPLES = r""" # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Create a group @@ -119,8 +105,8 @@ name: testgroup1 state: absent -''' -RETURN = r''' +""" +RETURN = r""" iam_group: description: dictionary containing all the group information including group membership returned: success @@ -176,7 +162,7 @@ description: the path to the user type: str sample: / -''' +""" try: import botocore @@ -185,9 +171,10 @@ from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict +from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code +from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry + from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule -from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry def compare_attached_group_policies(current_attached_policies, new_attached_policies):