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

Update plugin docs to explicitly list python, boto3 and botocore version requirements #819

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
1 change: 0 additions & 1 deletion docs/docsite/rst/dev_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,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.17.0
- botocore >= 1.20.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.20.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.20.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.20.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 @@ -71,6 +67,8 @@
type: string
choices: ['error', 'skip', 'warn']
version_added: 2.0.0
extends_documentation_fragment:
- amazon.aws.aws_boto3
'''

EXAMPLES = '''
Expand Down