diff --git a/README.md b/README.md index 6c2e3fafdc9..379b7aca82b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ As the AWS SDK for Python (Boto3 and Botocore) has [ceased supporting Python 2.7 Starting with the 2.0.0 releases of amazon.aws and community.aws, it is generally the collection's policy to support the versions of `botocore` and `boto3` that were released 12 months prior to the most recent major collection release, following semantic versioning (for example, 2.0.0, 3.0.0). -Version 2.0.0 of this collection supports `boto3 >= 1.13.0` and `botocore >= 1.16.0` +Version 2.0.0 of this collection supports `boto3 >= 1.15.0` and `botocore >= 1.18.0` ## Included content diff --git a/changelogs/fragments/675-boto3-minimums.yml b/changelogs/fragments/675-boto3-minimums.yml index 359636714d4..cab26b0de61 100644 --- a/changelogs/fragments/675-boto3-minimums.yml +++ b/changelogs/fragments/675-boto3-minimums.yml @@ -1,5 +1,5 @@ major_changes: -- community.aws collection - The community.aws collection has dropped support for ``botocore<1.16.0`` and ``boto3<1.13.0`` (https://github.com/ansible-collections/community.aws/pull/675). +- community.aws collection - The community.aws collection has dropped support for ``botocore<1.18.0`` and ``boto3<1.15.0`` (https://github.com/ansible-collections/community.aws/pull/711). Most modules will continue to work with older versions of the AWS SDK, however compatability with older versions of the SDK is not guaranteed and will not be tested. When using older versions of the SDK a warning will be emitted by Ansible (https://github.com/ansible-collections/amazon.aws/pull/442). minor_changes: diff --git a/plugins/modules/aws_msk_cluster.py b/plugins/modules/aws_msk_cluster.py index 41f2dd62e44..d6cf35d3ba3 100644 --- a/plugins/modules/aws_msk_cluster.py +++ b/plugins/modules/aws_msk_cluster.py @@ -544,7 +544,6 @@ def create_or_update_cluster(client, module): } }, "cluster_kafka_version": { - "botocore_version": "1.16.19", "current_value": cluster["CurrentBrokerSoftwareInfo"]["KafkaVersion"], "target_value": module.params.get("version"), "update_params": { diff --git a/plugins/modules/aws_msk_config.py b/plugins/modules/aws_msk_config.py index 6258ae916f6..f1966847422 100644 --- a/plugins/modules/aws_msk_config.py +++ b/plugins/modules/aws_msk_config.py @@ -279,9 +279,6 @@ def main(): module = AnsibleAWSModule(argument_spec=module_args, supports_check_mode=True) - # Support for update_configuration and delete_configuration added in 1.17.48 - module.require_botocore_at_least('1.17.48') - client = module.client("kafka", retry_decorator=AWSRetry.jittered_backoff()) if module.params["state"] == "present": diff --git a/plugins/modules/dynamodb_table.py b/plugins/modules/dynamodb_table.py index b23c443cac9..7a3add3727a 100644 --- a/plugins/modules/dynamodb_table.py +++ b/plugins/modules/dynamodb_table.py @@ -19,8 +19,8 @@ requirements: - python >= 3.6 - boto >= 2.49.0 -- boto3 >= 1.13.0 -- botocore >= 1.16.0 +- boto3 >= 1.15.0 +- botocore >= 1.18.0 options: state: description: diff --git a/requirements.txt b/requirements.txt index 0d58b96112d..8b7f0397090 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ boto>=2.49.0 -botocore>=1.16.0 -boto3>=1.13.0 +botocore>=1.18.0 +boto3>=1.15.0 diff --git a/tests/integration/targets/aws_msk_cluster/tasks/main.yml b/tests/integration/targets/aws_msk_cluster/tasks/main.yml index 9ace1814f81..a3049dad0b4 100644 --- a/tests/integration/targets/aws_msk_cluster/tasks/main.yml +++ b/tests/integration/targets/aws_msk_cluster/tasks/main.yml @@ -40,60 +40,38 @@ - set_fact: subnet_ids: '{{ subnets | community.general.json_query("results[].subnet.id") | list }}' - - pip: - name: virtualenv - - set_fact: - virtualenv: "{{ remote_tmp_dir }}/virtualenv" - virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" - - set_fact: - virtualenv_interpreter: "{{ virtualenv }}/bin/python" - - pip: - name: - - 'boto3>=1.13.0' - - 'botocore==1.17.48' - - 'coverage<5' - virtualenv: '{{ virtualenv }}' - virtualenv_command: '{{ virtualenv_command }}' - virtualenv_site_packages: no - # ============================================================ - - name: Wrap test in virtualenv - vars: - ansible_python_interpreter: "{{ virtualenv }}/bin/python" - block: - - name: create msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: - - "{{ msk_version }}" - register: msk_config + - name: create msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: + - "{{ msk_version }}" + register: msk_config - - name: create tests - include_tasks: test_create.yml + - name: create tests + include_tasks: test_create.yml - - name: update tests - include_tasks: test_update.yml + - name: update tests + include_tasks: test_update.yml - - name: delete tests - include_tasks: test_delete.yml + - name: delete tests + include_tasks: test_delete.yml - always: - - - name: delete msk cluster - aws_msk_cluster: - name: "{{ msk_cluster_name }}" - state: absent - wait: true - ignore_errors: yes + always: - - name: remove msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: absent - ignore_errors: yes + - name: delete msk cluster + aws_msk_cluster: + name: "{{ msk_cluster_name }}" + state: absent + wait: true + ignore_errors: yes - always: + - name: remove msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: absent + ignore_errors: yes - name: remove subnets ec2_vpc_subnet: diff --git a/tests/integration/targets/aws_msk_config/tasks/main.yml b/tests/integration/targets/aws_msk_config/tasks/main.yml index d29631c1930..cef9e1dfc90 100644 --- a/tests/integration/targets/aws_msk_config/tasks/main.yml +++ b/tests/integration/targets/aws_msk_config/tasks/main.yml @@ -9,161 +9,140 @@ collections: - amazon.aws block: - - - pip: - name: virtualenv - - set_fact: - virtualenv: "{{ remote_tmp_dir }}/virtualenv" - virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" - - set_fact: - virtualenv_interpreter: "{{ virtualenv }}/bin/python" - - pip: - name: - - 'boto3>=1.13.0' - - 'botocore==1.17.48' - - 'coverage<5' - virtualenv: '{{ virtualenv }}' - virtualenv_command: '{{ virtualenv_command }}' - virtualenv_site_packages: no - - - name: Wrap test in virtualenv - vars: - ansible_python_interpreter: "{{ virtualenv }}/bin/python" - block: - - name: create msk configuration (check mode) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[0] }}" - check_mode: yes - register: msk_config - - - name: assert that the msk configuration be created - assert: - that: - - msk_config is changed - - - name: create msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[0] }}" - register: msk_config - - - name: assert that the msk configuration is created - assert: - that: - - msk_config is changed - - - name: create msk configuration (idempotency) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[0] }}" - register: msk_config - - - name: assert that the msk configuration wasn't changed - assert: - that: - - msk_config is not changed - - - name: validate return values - assert: - that: - - msk_config.revision == 1 - - "msk_config.arn.startswith('arn:aws:kafka:{{ aws_region }}:')" - - "'auto.create.topics.enable=True' in msk_config.server_properties" - - "'zookeeper.session.timeout.ms=18000' in msk_config.server_properties" - - - name: update msk configuration (check mode) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[1] }}" - check_mode: yes - register: msk_config - - - name: assert that the msk configuration be changed - assert: - that: - - msk_config is changed - - - name: update msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[1] }}" - register: msk_config - - - name: assert that the msk configuration is changed - assert: - that: - - msk_config is changed - - - name: validate return values (update) - assert: - that: - - msk_config.revision == 2 - - "'auto.create.topics.enable=True' not in msk_config.server_properties" - - "'num.io.threads=8' in msk_config.server_properties" - - "'zookeeper.session.timeout.ms=36000' in msk_config.server_properties" - - - name: update msk configuration (idempotency) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "present" - kafka_versions: "{{ msk_kafka_versions }}" - config: "{{ msk_configs[1] }}" - register: msk_config - - - name: assert that the msk configuration wasn't changed - assert: - that: - - msk_config is not changed - - - name: delete msk configuration (check mode) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "absent" - check_mode: yes - register: msk_config - - - name: assert that the msk configuration be changed - assert: - that: - - msk_config is changed - - - name: delete msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: "absent" - register: msk_config - - - name: assert that the msk configuration is changed - assert: - that: - - msk_config is changed - - - name: delete msk configuration (idempotency) - aws_msk_config: - name: "{{ msk_config_name }}" - state: "absent" - register: msk_config - - - name: assert that the msk configuration wasn't changed - assert: - that: - - msk_config is not changed - - always: - - - name: remove msk configuration - aws_msk_config: - name: "{{ msk_config_name }}" - state: absent - ignore_errors: yes + - name: create msk configuration (check mode) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[0] }}" + check_mode: yes + register: msk_config + + - name: assert that the msk configuration be created + assert: + that: + - msk_config is changed + + - name: create msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[0] }}" + register: msk_config + + - name: assert that the msk configuration is created + assert: + that: + - msk_config is changed + + - name: create msk configuration (idempotency) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[0] }}" + register: msk_config + + - name: assert that the msk configuration wasn't changed + assert: + that: + - msk_config is not changed + + - name: validate return values + assert: + that: + - msk_config.revision == 1 + - "msk_config.arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "'auto.create.topics.enable=True' in msk_config.server_properties" + - "'zookeeper.session.timeout.ms=18000' in msk_config.server_properties" + + - name: update msk configuration (check mode) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[1] }}" + check_mode: yes + register: msk_config + + - name: assert that the msk configuration be changed + assert: + that: + - msk_config is changed + + - name: update msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[1] }}" + register: msk_config + + - name: assert that the msk configuration is changed + assert: + that: + - msk_config is changed + + - name: validate return values (update) + assert: + that: + - msk_config.revision == 2 + - "'auto.create.topics.enable=True' not in msk_config.server_properties" + - "'num.io.threads=8' in msk_config.server_properties" + - "'zookeeper.session.timeout.ms=36000' in msk_config.server_properties" + + - name: update msk configuration (idempotency) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "present" + kafka_versions: "{{ msk_kafka_versions }}" + config: "{{ msk_configs[1] }}" + register: msk_config + + - name: assert that the msk configuration wasn't changed + assert: + that: + - msk_config is not changed + + - name: delete msk configuration (check mode) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "absent" + check_mode: yes + register: msk_config + + - name: assert that the msk configuration be changed + assert: + that: + - msk_config is changed + + - name: delete msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: "absent" + register: msk_config + + - name: assert that the msk configuration is changed + assert: + that: + - msk_config is changed + + - name: delete msk configuration (idempotency) + aws_msk_config: + name: "{{ msk_config_name }}" + state: "absent" + register: msk_config + + - name: assert that the msk configuration wasn't changed + assert: + that: + - msk_config is not changed + + always: + + - name: remove msk configuration + aws_msk_config: + name: "{{ msk_config_name }}" + state: absent + ignore_errors: yes diff --git a/tests/integration/targets/aws_s3_bucket_info/tasks/bucket_ownership_controls.yml b/tests/integration/targets/aws_s3_bucket_info/tasks/bucket_ownership_controls.yml index 8dd14bfbd42..77c193043a9 100644 --- a/tests/integration/targets/aws_s3_bucket_info/tasks/bucket_ownership_controls.yml +++ b/tests/integration/targets/aws_s3_bucket_info/tasks/bucket_ownership_controls.yml @@ -10,7 +10,7 @@ virtualenv_interpreter: "{{ virtualenv }}/bin/python" - pip: name: - - 'boto3>=1.13.0' + - 'boto3>=1.15.0' - 'botocore==1.18.11' - 'coverage<5' virtualenv: '{{ virtualenv }}' diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index 4b10ff777a4..7a0fc97967f 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -1,3 +1,3 @@ placebo -botocore>=1.16.0 -boto3>=1.13.0 +botocore>=1.18.0 +boto3>=1.15.0