Skip to content

Commit

Permalink
Merge branch 'main' into cloudtrail_disable_encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble authored Feb 22, 2023
2 parents 949e615 + e9301e4 commit 7b17fc3
Show file tree
Hide file tree
Showing 89 changed files with 694 additions and 732 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/1382-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- bulk update module docs to use new fragment names (https://github.com/ansible-collections/amazon.aws/pull/1382).
8 changes: 4 additions & 4 deletions plugins/inventory/aws_ec2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
name: aws_ec2
short_description: EC2 inventory source
extends_documentation_fragment:
Expand Down Expand Up @@ -133,9 +133,9 @@
- The suffix for host variables names coming from AWS.
type: str
version_added: 3.1.0
'''
"""

EXAMPLES = '''
EXAMPLES = r"""
# Minimal example using environment vars or instance role credentials
# Fetch all hosts in us-east-1, the hostname is the public DNS if it exists, otherwise the private IP address
plugin: aws_ec2
Expand Down Expand Up @@ -251,7 +251,7 @@
- us-east-1
hostvars_prefix: 'aws_'
hostvars_suffix: '_ec2'
'''
"""

import re

Expand Down
8 changes: 4 additions & 4 deletions plugins/inventory/aws_rds.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2018 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
name: aws_rds
short_description: RDS instance inventory source
description:
Expand Down Expand Up @@ -57,9 +57,9 @@
- amazon.aws.assume_role.plugins
author:
- Sloane Hertel (@s-hertel)
'''
"""

EXAMPLES = '''
EXAMPLES = r"""
plugin: aws_rds
regions:
- us-east-1
Expand All @@ -73,7 +73,7 @@
- key: region
hostvars_prefix: aws_
hostvars_suffix: _rds
'''
"""

try:
import botocore
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/aws_collection_constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (c) 2023 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
name: aws_collection_constants
author:
- Mark Chappell (@tremble)
Expand All @@ -21,12 +21,12 @@
- COMMUNITY_AWS_COLLECTION_VERSION
- COMMUNITY_AWS_COLLECTION_NAME
required: True
'''
"""

EXAMPLES = """
EXAMPLES = r"""
"""

RETURN = """
RETURN = r"""
_raw:
description: value
type: str
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/aws_service_ip_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
name: aws_service_ip_ranges
author:
- James Turner (!UNKNOWN) <[email protected]>
Expand All @@ -20,9 +20,9 @@
ipv6_prefixes:
description: 'When I(ipv6_prefixes=True) the lookup will return ipv6 addresses instead of ipv4 addresses'
version_added: 2.1.0
'''
"""

EXAMPLES = """
EXAMPLES = r"""
vars:
ec2_ranges: "{{ lookup('aws_service_ip_ranges', region='ap-southeast-2', service='EC2', wantlist=True) }}"
tasks:
Expand All @@ -36,7 +36,7 @@
# "52.92.16.0/20,52.216.0.0/15,54.231.0.0/17"
"""

RETURN = """
RETURN = r"""
_raw:
description: comma-separated list of CIDR ranges
"""
Expand Down
16 changes: 8 additions & 8 deletions plugins/modules/autoscaling_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = r'''
DOCUMENTATION = r"""
---
module: autoscaling_group
version_added: 5.0.0
Expand Down Expand Up @@ -331,12 +331,12 @@
type: list
elements: str
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.common.modules
- amazon.aws.region.modules
- amazon.aws.boto3
'''
"""

EXAMPLES = r'''
EXAMPLES = r"""
# Basic configuration with Launch Configuration
- amazon.aws.autoscaling_group:
Expand Down Expand Up @@ -444,9 +444,9 @@
tags:
- environment: production
propagate_at_launch: false
'''
"""

RETURN = r'''
RETURN = r"""
---
auto_scaling_group_name:
description: The unique name of the auto scaling group
Expand Down Expand Up @@ -648,7 +648,7 @@
"Metric": "GroupInServiceInstances"
}
]
'''
"""

import time

Expand Down
16 changes: 8 additions & 8 deletions plugins/modules/autoscaling_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
---
module: autoscaling_group_info
version_added: 5.0.0
Expand All @@ -29,12 +29,12 @@
required: false
type: dict
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.common.modules
- amazon.aws.region.modules
- amazon.aws.boto3
'''
"""

EXAMPLES = '''
EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Find all groups
Expand Down Expand Up @@ -71,9 +71,9 @@
name: public-webserver-asg
register: asgs
failed_when: "{{ asgs.results | length > 1 }}"
'''
"""

RETURN = '''
RETURN = r"""
---
auto_scaling_group_arn:
description: The Amazon Resource Name of the ASG
Expand Down Expand Up @@ -234,7 +234,7 @@
returned: success
type: str
sample: ["Default"]
'''
"""

import re

Expand Down
18 changes: 9 additions & 9 deletions plugins/modules/aws_az_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
module: aws_az_info
short_description: Gather information about availability zones in AWS
version_added: 1.0.0
Expand All @@ -22,12 +22,12 @@
default: {}
type: dict
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''
- amazon.aws.common.modules
- amazon.aws.region.modules
- amazon.aws.boto3
"""

EXAMPLES = '''
EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather information about all availability zones
Expand All @@ -37,9 +37,9 @@
amazon.aws.aws_az_info:
filters:
zone-name: eu-west-1a
'''
"""

RETURN = '''
RETURN = r"""
availability_zones:
returned: on success
description: >
Expand Down Expand Up @@ -137,7 +137,7 @@
"zone_type": "availability-zone"
}
]
'''
"""

try:
from botocore.exceptions import ClientError, BotoCoreError
Expand Down
16 changes: 8 additions & 8 deletions plugins/modules/aws_caller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
---
module: aws_caller_info
version_added: 1.0.0
Expand All @@ -16,20 +16,20 @@
- Stijn Dubrul (@sdubrul)
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.common.modules
- amazon.aws.region.modules
- amazon.aws.boto3
'''
"""

EXAMPLES = '''
EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Get the current caller identity information
amazon.aws.aws_caller_info:
register: caller_info
'''
"""

RETURN = '''
RETURN = r"""
account:
description: The account id the access credentials are associated with.
returned: success
Expand All @@ -52,7 +52,7 @@
returned: success
type: str
sample: 123456789012:my-federated-user-name
'''
"""

try:
from botocore.exceptions import BotoCoreError, ClientError
Expand Down
21 changes: 12 additions & 9 deletions plugins/modules/cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = '''
DOCUMENTATION = r"""
---
module: cloudformation
version_added: 1.0.0
Expand Down Expand Up @@ -158,12 +158,12 @@
author:
- "James S. Martin (@jsmartin)"
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.common.modules
- amazon.aws.region.modules
- amazon.aws.boto3
'''
"""

EXAMPLES = '''
EXAMPLES = r"""
- name: create a cloudformation stack
amazon.aws.cloudformation:
stack_name: "ansible-cloudformation"
Expand Down Expand Up @@ -275,14 +275,17 @@
state: present
template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
on_create_failure: DELETE
'''
"""

RETURN = '''
RETURN = r"""
events:
type: list
description: Most recent events in CloudFormation's event log. This may be from a previous run in some cases.
returned: always
sample: ["StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE", "StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"]
sample: [
"StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE",
"StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
]
log:
description: Debugging logs. Useful when modifying or finding an error.
returned: always
Expand Down Expand Up @@ -312,7 +315,7 @@
description: A key:value dictionary of all the stack outputs currently defined. If there are no stack outputs, it is an empty dictionary.
returned: state == present
sample: {"MySg": "AnsibleModuleTestYAML-CFTestSg-C8UVS567B6NS"}
''' # NOQA
"""

import json
import time
Expand Down
Loading

0 comments on commit 7b17fc3

Please sign in to comment.