Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup doc_fragments/aws.py #985

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/985-cleanup_doc_fragments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
breaking_changes:
- doc_fragments - remove minimum collection requirements from doc_fragments/aws.py and allow pulling those from doc_fragments/aws_boto3.py instead (https://github.com/ansible-collections/amazon.aws/pull/985).
4 changes: 3 additions & 1 deletion docs/docsite/rst/dev_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,12 @@ An example of the older style connection used for modules based on AnsibleModule
Common Documentation Fragments for Connection Parameters
--------------------------------------------------------

There are two :ref:`common documentation fragments <module_docs_fragments>`
There are four :ref:`common documentation fragments <module_docs_fragments>`
that should be included into almost all AWS modules:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github won't let me put this comment on a line you didn't change, but two lines above this "There are two" should probably be updated to say "There are four".

* ``aws`` - contains the common boto3 connection parameters
* ``ec2`` - contains the common region parameter required for many AWS modules
* ``boto3`` - contains the minimum requirements for the collection
* ``tags`` - contains the common tagging parameters used by many AWS modules

These fragments should be used rather than re-documenting these properties to ensure consistency
Expand All @@ -312,6 +313,7 @@ and that the more esoteric connection options are documented. For example:
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

.. _ansible_collections.amazon.aws.docsite.dev_exceptions:
Expand Down
4 changes: 0 additions & 4 deletions plugins/doc_fragments/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ class ModuleDocFragment(object):
- A dictionary to modify the botocore configuration.
- Parameters can be found at U(https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config).
type: dict
requirements:
- python >= 3.6
- boto3 >= 1.18.0
- botocore >= 1.21.0
notes:
- If parameters are not set within the module, the following
environment variables can be used in decreasing order of precedence
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion plugins/inventory/aws_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
extends_documentation_fragment:
- inventory_cache
- constructed
- amazon.aws.aws_boto3
- amazon.aws.boto3
- amazon.aws.aws_credentials
description:
- Get inventory hosts from Amazon Web Services EC2.
Expand Down
2 changes: 1 addition & 1 deletion plugins/inventory/aws_rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
extends_documentation_fragment:
- inventory_cache
- constructed
- amazon.aws.aws_boto3
- amazon.aws.boto3
- amazon.aws.aws_credentials
author:
- Sloane Hertel (@s-hertel)
Expand Down
2 changes: 1 addition & 1 deletion plugins/lookup/aws_account_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author:
- Sloane Hertel (@s-hertel) <shertel@redhat.com>
extends_documentation_fragment:
- amazon.aws.aws_boto3
- amazon.aws.boto3
- amazon.aws.aws_credentials
- amazon.aws.aws_region
short_description: Look up AWS account attributes
Expand Down
2 changes: 1 addition & 1 deletion plugins/lookup/aws_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
author:
- Aaron Smith (!UNKNOWN) <ajsmith10381@gmail.com>
extends_documentation_fragment:
- amazon.aws.aws_boto3
- amazon.aws.boto3
- amazon.aws.aws_credentials
- amazon.aws.aws_region

Expand Down
2 changes: 1 addition & 1 deletion plugins/lookup/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
type: string
version_added: 3.3.0
extends_documentation_fragment:
- amazon.aws.aws_boto3
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/autoscaling_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/autoscaling_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/aws_az_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/aws_caller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cloudformation_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudtrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3

'''

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudtrail_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudwatch_metric_alarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/cloudwatch_metric_alarm_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3

'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudwatchevent_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3

author: "Jim Dalton (@jsdalton) <jim.dalton@gmail.com>"
notes:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudwatchlogs_log_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3

'''

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudwatchlogs_log_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cloudwatchlogs_log_group_metric_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3

'''

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_ami.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
'''

# Thank you to iAcquire for sponsoring development of this module.
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_ami_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_eip.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3

author:
- "Rick Mendes (@rickmendes) <rmendes@illumina.com>"
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_eip_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3

'''

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_eni.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
notes:
- This module identifies and ENI based on either the I(eni_id), a combination of I(private_ip_address) and I(subnet_id),
or a combination of I(instance_id) and I(device_id). Any of these options will let you specify a particular ENI.
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_eni_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_instance_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3

author:
- "Vincent Viallet (@zbal)"
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_security_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags

- amazon.aws.boto3

notes:
- If a rule declares a group_name and that group doesn't exist, it will be
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_security_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3

'''

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_snapshot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
extends_documentation_fragment:
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_spot_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_spot_instance_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_tag_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_vol_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_vpc_dhcp_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
'''

RETURN = """
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_vpc_dhcp_option_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.boto3
'''

EXAMPLES = '''
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ec2_vpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_endpoint_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_endpoint_service_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.boto3
'''

EXAMPLES = r'''
Expand Down
Loading