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 the default module requirements from python-2.6/boto to python-3.6/botocore-1.16 (breaking change) #298

Merged
merged 5 commits into from
May 19, 2021
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/298-python3.6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
major_changes:
- amazon.aws collection - Due to the AWS SDKs announcing the end of support for Python less than 3.6 (https://boto3.amazonaws.com/v1/documentation/api/1.17.64/guide/migrationpy3.html) this collection now requires Python 3.6+ (https://github.com/ansible-collections/amazon.aws/pull/298).
11 changes: 6 additions & 5 deletions plugins/doc_fragments/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ class ModuleDocFragment(object):
aws_ca_bundle:
description:
- "The location of a CA Bundle to use when validating SSL certificates."
- "Only used for boto3 based modules."
- "Not used by boto 2 based modules."
- "Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally."
type: path
validate_certs:
description:
- When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
- When set to "no", SSL certificates will not be validated for
communication with the AWS APIs.
type: bool
default: yes
profile:
description:
- Uses a boto profile. Only works with boto >= 2.24.0.
- Using I(profile) will override I(aws_access_key), I(aws_secret_key) and I(security_token)
and support for passing them at the same time as I(profile) has been deprecated.
- I(aws_access_key), I(aws_secret_key) and I(security_token) will be made mutually exclusive with I(profile) after 2022-06-01.
Expand All @@ -76,8 +76,9 @@ class ModuleDocFragment(object):
- Only the 'user_agent' key is used for boto modules. See U(http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto) for more boto configuration.
type: dict
requirements:
- python >= 2.6
- boto
- python >= 3.6
- boto3 >= 1.13.0
- botocore >= 1.16.0
notes:
- If parameters are not set within the module, the following
environment variables can be used in decreasing order of precedence
Expand Down
3 changes: 2 additions & 1 deletion plugins/lookup/aws_account_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
author:
- Sloane Hertel <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore
- botocore >= 1.16.0
extends_documentation_fragment:
- amazon.aws.aws_credentials
- amazon.aws.aws_region
Expand Down
3 changes: 2 additions & 1 deletion plugins/lookup/aws_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
author:
- Aaron Smith <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore>=1.10.0
- botocore >= 1.16.0
extends_documentation_fragment:
- amazon.aws.aws_credentials
- amazon.aws.aws_region
Expand Down
3 changes: 2 additions & 1 deletion plugins/lookup/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
- Marat Bakeev <hawara(at)gmail.com>
- Michael De La Rue <[email protected]>
requirements:
- python >= 3.6
- boto3
- botocore
- botocore >= 1.16.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
2 changes: 0 additions & 2 deletions plugins/modules/aws_az_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

requirements: [botocore, boto3]
'''

EXAMPLES = '''
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/aws_caller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
- Ed Costello (@orthanc)
- Stijn Dubrul (@sdubrul)

requirements: [ 'botocore', 'boto3' ]
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/aws_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
description:
- This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and
deleting both objects and buckets, retrieving objects as files or strings and generating download links.
This module has a dependency on boto3 and botocore.
options:
bucket:
description:
Expand Down Expand Up @@ -118,7 +117,6 @@
dualstack:
description:
- Enables Amazon S3 Dual-Stack Endpoints, allowing S3 communications using both IPv4 and IPv6.
- Requires at least botocore version 1.4.45.
type: bool
default: false
rgw:
Expand Down Expand Up @@ -157,7 +155,6 @@
description:
- KMS key id to use when encrypting objects using I(encrypting=aws:kms). Ignored if I(encryption) is not C(aws:kms).
type: str
requirements: [ "boto3", "botocore" ]
author:
- "Lester Wade (@lwade)"
- "Sloane Hertel (@s-hertel)"
Expand Down
4 changes: 1 addition & 3 deletions plugins/modules/cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
type: str
termination_protection:
description:
- Enable or disable termination protection on the stack. Only works with botocore >= 1.7.18.
- Enable or disable termination protection on the stack.
type: bool
template_body:
description:
Expand Down Expand Up @@ -174,8 +174,6 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

requirements: [ boto3, botocore>=1.5.45 ]
'''

EXAMPLES = '''
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/cloudformation_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
- Gets information about an AWS CloudFormation stack.
- This module was called C(amazon.aws.cloudformation_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(amazon.aws.cloudformation_info) module no longer returns C(ansible_facts)!
requirements:
- boto3 >= 1.0.0
- python >= 2.6
author:
- Justin Menga (@jmenga)
- Kevin Coming (@waffie1)
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
requirements:
- python >= 2.6
- boto

'''

Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_ami_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
- This module was called C(amazon.aws.ec2_ami_facts) before Ansible 2.9. The usage did not change.
author:
- Prasad Katti (@prasadkatti)
requirements: [ boto3 ]
options:
image_ids:
description: One or more image IDs.
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/ec2_elb_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
- amazon.aws.aws
- amazon.aws.ec2

requirements:
- python >= 2.6
- boto

'''

EXAMPLES = """
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_eni_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- Gather information about ec2 ENI interfaces in AWS.
- This module was called C(ec2_eni_facts) before Ansible 2.9. The usage did not change.
author: "Rob White (@wimnat)"
requirements: [ boto3 ]
options:
eni_id:
description:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
module: ec2_group
version_added: 1.0.0
author: "Andrew de Quincey (@adq)"
requirements: [ boto3 ]
short_description: maintain an ec2 VPC security group.
description:
- Maintains ec2 security groups.
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
description:
- Gather information about ec2 security groups in AWS.
- This module was called C(amazon.aws.ec2_group_facts) before Ansible 2.9. The usage did not change.
requirements: [ boto3 ]
author:
- Henrique Rodrigues (@Sodki)
options:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
- amazon.aws.aws
- amazon.aws.ec2

requirements: [ boto3 ]
author:
- "Vincent Viallet (@zbal)"
- "Prasad Katti (@prasadkatti)"
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_snapshot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
description:
- Gather information about ec2 volume snapshots in AWS.
- This module was called C(ec2_snapshot_facts) before Ansible 2.9. The usage did not change.
requirements: [ boto3 ]
author:
- "Rob White (@wimnat)"
- Aubin Bikouo (@abikouo)
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- Creates, modifies and removes tags for any EC2 resource.
- Resources are referenced by their resource id (for example, an instance being i-XXXXXXX, a VPC being vpc-XXXXXXX).
- This module is designed to be used with complex args (tags), see the examples.
requirements: [ "boto3", "botocore" ]
options:
resource:
description:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_tag_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- Lists tags for any EC2 resource.
- Resources are referenced by their resource id (e.g. an instance being i-XXXXXXX, a vpc being vpc-XXXXXX).
- Resource tags can be managed using the M(amazon.aws.ec2_tag) module.
requirements: [ "boto3", "botocore" ]
options:
resource:
description:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_vol_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
description:
- Gather information about ec2 volumes in AWS.
- This module was called C(ec2_vol_facts) before Ansible 2.9. The usage did not change.
requirements: [ boto3 ]
author: "Rob White (@wimnat)"
options:
filters:
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/ec2_vpc_dhcp_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

requirements:
- boto
'''

RETURN = """
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_vpc_dhcp_option_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
description:
- Gather information about dhcp options sets in AWS.
- This module was called C(ec2_vpc_dhcp_option_facts) before Ansible 2.9. The usage did not change.
requirements: [ boto3 ]
author: "Nick Aslanidis (@naslanidis)"
options:
filters:
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/ec2_vpc_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
duplicate VPCs created.
type: bool
default: false
requirements:
- boto3
- botocore
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/ec2_vpc_net_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
- Gather information about ec2 VPCs in AWS
- This module was called C(ec2_vpc_net_facts) before Ansible 2.9. The usage did not change.
author: "Rob White (@wimnat)"
requirements:
- boto3
- botocore
options:
vpc_ids:
description:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_vpc_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
author:
- Robert Estelle (@erydo)
- Brad Davidson (@brandond)
requirements: [ boto3 ]
options:
az:
description:
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/ec2_vpc_subnet_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
- Gather information about ec2 VPC subnets in AWS
- This module was called C(ec2_vpc_subnet_facts) before Ansible 2.9. The usage did not change.
author: "Rob White (@wimnat)"
requirements:
- boto3
- botocore
options:
subnet_ids:
description:
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/s3_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
short_description: Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID
description:
- Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID.
requirements: [ boto3 ]
author:
- Rob White (@wimnat)
- Aubin Bikouo (@abikouo)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
boto>=2.49.0
botocore>=1.12.249
boto3>=1.9.249
botocore>=1.16.0
boto3>=1.13.0
2 changes: 1 addition & 1 deletion tests/unit/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
boto3
boto3>=1.13.0
placebo