Skip to content

Commit

Permalink
Update plugin docs to explicitly list python, boto3 and botocore vers…
Browse files Browse the repository at this point in the history
…ion requirements in line with collection requirements (ansible-collections#819) (ansible-collections#821)

[stable-3] Update plugin docs to explicitly list python, boto3 and botocore version

Manual backport of ansible-collections#819
SUMMARY
Update plugin docs to explicitly list python, boto3 and botocore version requirements in line with collection requirements.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/inventory/aws_ec2.py
plugins/inventory/aws_rds.py
plugins/lookup/aws_account_attribute.py
plugins/lookup/aws_secret.py
plugins/lookup/aws_ssm.py
ADDITIONAL INFORMATION
This is in line with the collection requirements, just trying to make it easier to find.

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored May 19, 2022
1 parent c443556 commit 492512b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
1 change: 0 additions & 1 deletion docs/docsite/rst/dev_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ and that the more esoteric connection options are documented. For example:
DOCUMENTATION = '''
module: my_module
# some lines omitted here
requirements: [ 'botocore', 'boto3' ]
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
Expand Down
19 changes: 19 additions & 0 deletions plugins/doc_fragments/aws_boto3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2022, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type


class ModuleDocFragment(object):

# Minimum requirements for the collection
DOCUMENTATION = r'''
options: {}
requirements:
- python >= 3.6
- boto3 >= 1.16.0
- botocore >= 1.19.0
'''
4 changes: 1 addition & 3 deletions plugins/inventory/aws_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
DOCUMENTATION = '''
name: aws_ec2
short_description: EC2 inventory source
requirements:
- boto3
- botocore
extends_documentation_fragment:
- inventory_cache
- constructed
- amazon.aws.aws_boto3
- amazon.aws.aws_credentials
description:
Expand Down
4 changes: 1 addition & 3 deletions plugins/inventory/aws_rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
extends_documentation_fragment:
- inventory_cache
- constructed
- amazon.aws.aws_boto3
- amazon.aws.aws_credentials
requirements:
- boto3
- botocore
author: Sloane Hertel (@s-hertel)
'''

Expand Down
5 changes: 1 addition & 4 deletions plugins/lookup/aws_account_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
name: aws_account_attribute
author:
- Sloane Hertel (@s-hertel) <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore >= 1.19.0
extends_documentation_fragment:
- amazon.aws.aws_boto3
- amazon.aws.aws_credentials
- amazon.aws.aws_region
Expand Down
5 changes: 1 addition & 4 deletions plugins/lookup/aws_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
name: aws_secret
author:
- Aaron Smith (!UNKNOWN) <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore >= 1.19.0
extends_documentation_fragment:
- amazon.aws.aws_boto3
- amazon.aws.aws_credentials
- amazon.aws.aws_region
Expand Down
6 changes: 2 additions & 4 deletions plugins/lookup/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
- Bill Wang (!UNKNOWN) <ozbillwang(at)gmail.com>
- Marat Bakeev (!UNKNOWN) <hawara(at)gmail.com>
- Michael De La Rue (!UNKNOWN) <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore >= 1.19.0
short_description: Get the value for a SSM parameter or all parameters under a path.
description:
- Get the value for an Amazon Simple Systems Manager parameter or a hierarchy of parameters.
Expand Down Expand Up @@ -74,6 +70,8 @@
type: string
choices: ['error', 'skip', 'warn']
version_added: 2.0.0
extends_documentation_fragment:
- amazon.aws.aws_boto3
'''

EXAMPLES = '''
Expand Down

0 comments on commit 492512b

Please sign in to comment.