From b0c24a308f343add252b34f4946898755547d6fd Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 19 May 2022 16:40:24 +0200 Subject: [PATCH] Update plugin docs to explicitly list python, boto3 and botocore version requirements in line with collection requirements (#819) Update plugin docs to explicitly list python, boto3 and botocore version requirements 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 --- plugins/doc_fragments/aws_boto3.py | 19 +++++++++++++++++++ plugins/inventory/aws_ec2.py | 4 +--- plugins/inventory/aws_rds.py | 4 +--- plugins/lookup/aws_account_attribute.py | 7 ++----- plugins/lookup/aws_secret.py | 7 ++----- plugins/lookup/aws_ssm.py | 12 +++++------- 6 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 plugins/doc_fragments/aws_boto3.py diff --git a/plugins/doc_fragments/aws_boto3.py b/plugins/doc_fragments/aws_boto3.py new file mode 100644 index 00000000000..69455597838 --- /dev/null +++ b/plugins/doc_fragments/aws_boto3.py @@ -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.15.0 + - botocore >= 1.18.0 +''' diff --git a/plugins/inventory/aws_ec2.py b/plugins/inventory/aws_ec2.py index 9d0af92416f..4f39dc4c004 100644 --- a/plugins/inventory/aws_ec2.py +++ b/plugins/inventory/aws_ec2.py @@ -8,12 +8,10 @@ name: aws_ec2 plugin_type: inventory short_description: EC2 inventory source - requirements: - - boto3 - - botocore extends_documentation_fragment: - inventory_cache - constructed + - amazon.aws.aws_boto3 - amazon.aws.aws_credentials description: diff --git a/plugins/inventory/aws_rds.py b/plugins/inventory/aws_rds.py index ecdd4ac0f46..a5fe26999ee 100644 --- a/plugins/inventory/aws_rds.py +++ b/plugins/inventory/aws_rds.py @@ -44,11 +44,9 @@ extends_documentation_fragment: - inventory_cache - constructed + - amazon.aws.aws_boto3 - amazon.aws.aws_credentials - requirements: - - boto3 - - botocore author: Sloane Hertel (@s-hertel) ''' diff --git a/plugins/lookup/aws_account_attribute.py b/plugins/lookup/aws_account_attribute.py index 6ac58d40c90..f258f5a5161 100644 --- a/plugins/lookup/aws_account_attribute.py +++ b/plugins/lookup/aws_account_attribute.py @@ -6,12 +6,9 @@ DOCUMENTATION = ''' lookup: aws_account_attribute author: - - Sloane Hertel -requirements: - - python >= 3.6 - - boto3 - - botocore >= 1.18.0 + - Sloane Hertel (@s-hertel) extends_documentation_fragment: +- amazon.aws.aws_boto3 - amazon.aws.aws_credentials - amazon.aws.aws_region diff --git a/plugins/lookup/aws_secret.py b/plugins/lookup/aws_secret.py index 1bb815989e6..244e25e58b8 100644 --- a/plugins/lookup/aws_secret.py +++ b/plugins/lookup/aws_secret.py @@ -7,12 +7,9 @@ DOCUMENTATION = r''' lookup: aws_secret author: - - Aaron Smith -requirements: - - python >= 3.6 - - boto3 - - botocore >= 1.18.0 + - Aaron Smith (!UNKNOWN) extends_documentation_fragment: +- amazon.aws.aws_boto3 - amazon.aws.aws_credentials - amazon.aws.aws_region diff --git a/plugins/lookup/aws_ssm.py b/plugins/lookup/aws_ssm.py index 678dbed851f..973fc722d59 100644 --- a/plugins/lookup/aws_ssm.py +++ b/plugins/lookup/aws_ssm.py @@ -10,13 +10,9 @@ DOCUMENTATION = ''' lookup: aws_ssm author: - - Bill Wang - - Marat Bakeev - - Michael De La Rue -requirements: - - python >= 3.6 - - boto3 - - botocore >= 1.18.0 + - Bill Wang (!UNKNOWN) + - Marat Bakeev (!UNKNOWN) + - Michael De La Rue (!UNKNOWN) 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. @@ -74,6 +70,8 @@ type: string choices: ['error', 'skip', 'warn'] version_added: 2.0.0 +extends_documentation_fragment: +- amazon.aws.aws_boto3 ''' EXAMPLES = '''