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 module deprecations #70

Merged
merged 3 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
22 changes: 11 additions & 11 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,45 +50,45 @@ plugin_routing:
modules:
aws_az_facts:
deprecation:
removal_date: TBD
removal_date: 2022-06-01
warning_text: see plugin documentation for details
aws_caller_facts:
deprecation:
removal_date: TBD
removal_date: 2022-06-01
jillr marked this conversation as resolved.
Show resolved Hide resolved
warning_text: see plugin documentation for details
cloudformation_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_ami_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_eni_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_group_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_snapshot_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_vol_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_vpc_dhcp_option_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_vpc_net_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
ec2_vpc_subnet_facts:
deprecation:
removal_date: TBD
removal_date: 2021-12-01
warning_text: see plugin documentation for details
2 changes: 1 addition & 1 deletion plugins/module_utils/aws/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AWSConnection(object):
def __init__(self, ansible_obj, resources, boto3=True):

ansible_obj.deprecate("The 'ansible.module_utils.aws.batch.AWSConnection' class is deprecated please use 'AnsibleAWSModule.client()'",
version='2.14')
date='2022-06-01', collection_name='amazon.aws')

self.region, self.endpoint, aws_connect_kwargs = get_aws_connection_info(ansible_obj, boto3=boto3)

Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AWSConnection(object):
def __init__(self, ansible_obj, resources, boto3=True):

ansible_obj.deprecate("The 'ansible.module_utils.aws.batch.AWSConnection' class is deprecated please use 'AnsibleAWSModule.client()'",
version='2.14')
date='2022-06-01', collection_name='amazon.aws')

self.region, self.endpoint, aws_connect_kwargs = get_aws_connection_info(ansible_obj, boto3=boto3)

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/aws_az_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec)
if module._name == 'aws_az_facts':
module.deprecate("The 'aws_az_facts' module has been renamed to 'aws_az_info'", version='2.14')
module.deprecate("The 'aws_az_facts' module has been renamed to 'aws_az_info'", date='2022-06-01', collection_name='amazon.aws')

connection = module.client('ec2', retry_decorator=AWSRetry.jittered_backoff())

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/aws_caller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main():
supports_check_mode=True,
)
if module._name == 'aws_caller_facts':
module.deprecate("The 'aws_caller_facts' module has been renamed to 'aws_caller_info'", version='2.13')
module.deprecate("The 'aws_caller_facts' module has been renamed to 'aws_caller_info'", date='2021-12-01', collection_name='amazon.aws')

client = module.client('sts')

Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
type: str
template_format:
description:
- This parameter is ignored since Ansible 2.3 and will be removed in Ansible 2.14.
- This parameter is ignored since Ansible 2.3 and will be removed after 2022-06-01.
- Templates are now passed raw to CloudFormation regardless of format.
type: str
role_arn:
Expand Down Expand Up @@ -633,7 +633,7 @@ def main():
create_timeout=dict(default=None, type='int'),
template_url=dict(default=None, required=False),
template_body=dict(default=None, required=False),
template_format=dict(removed_in_version='2.14'),
template_format=dict(removed_at_date='2022-06-01', removed_from_collection='amazon.aws'),
create_changeset=dict(default=False, type='bool'),
changeset_name=dict(default=None, required=False),
role_arn=dict(default=None, required=False),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cloudformation_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

# When the module is called as cloudformation_facts, return values are published
# in ansible_facts['cloudformation'][<stack_name>] and can be used as follows.
# Note that this is deprecated and will stop working in Ansible 2.13.
# Note that this is deprecated and will stop working in Ansible after 2021-12-01.

- amazon.aws.cloudformation_facts:
stack_name: my-cloudformation-stack
Expand Down Expand Up @@ -299,7 +299,7 @@ def main():
is_old_facts = module._name == 'cloudformation_facts'
if is_old_facts:
module.deprecate("The 'cloudformation_facts' module has been renamed to 'cloudformation_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts", date='2021-12-01', collection_name='amazon.aws')

service_mgr = CloudFormationServiceManager(module)

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ def main():
module.deprecate(
msg='Support for passing both group and group_id has been deprecated. '
'Currently group_id is ignored, in future passing both will result in an error',
version='2.14')
date='2022-06-01', collection_name='amazon.aws')

if not HAS_BOTO:
module.fail_json(msg='boto required for this module')
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_ami_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
if module._module._name == 'ec2_ami_facts':
module._module.deprecate("The 'ec2_ami_facts' module has been renamed to 'ec2_ami_info'", version='2.13')
module._module.deprecate("The 'ec2_ami_facts' module has been renamed to 'ec2_ami_info'", date='2021-12-01', collection_name='amazon.aws')

ec2_client = module.client('ec2')

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_eni_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec)
if module._name == 'ec2_eni_facts':
module.deprecate("The 'ec2_eni_facts' module has been renamed to 'ec2_eni_info'", version='2.13')
module.deprecate("The 'ec2_eni_facts' module has been renamed to 'ec2_eni_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_group_facts':
module.deprecate("The 'ec2_group_facts' module has been renamed to 'ec2_group_info'", version='2.13')
module.deprecate("The 'ec2_group_facts' module has been renamed to 'ec2_group_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
type: str
wait:
description:
- This option has no effect since version 2.5 and will be removed in 2.14.
- This option has no effect since version 2.5 and will be removed after 2022-06-01.
type: bool
wait_timeout:
description:
- This option has no effect since version 2.5 and will be removed in 2.14.
- This option has no effect since version 2.5 and will be removed after 2022-06-01.
type: int
required: false

Expand Down Expand Up @@ -241,8 +241,8 @@ def main():
key_material=dict(),
force=dict(type='bool', default=True),
state=dict(default='present', choices=['present', 'absent']),
wait=dict(type='bool', removed_in_version='2.14'),
wait_timeout=dict(type='int', removed_in_version='2.14')
wait=dict(type='bool', removed_at_date='2022-06-01', removed_from_collection='amazon.aws'),
wait_timeout=dict(type='int', removed_at_date='2022-06-01', removed_from_collection='amazon.aws')
)

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_snapshot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def main():
]
)
if module._name == 'ec2_snapshot_facts':
module.deprecate("The 'ec2_snapshot_facts' module has been renamed to 'ec2_snapshot_info'", version='2.13')
module.deprecate("The 'ec2_snapshot_facts' module has been renamed to 'ec2_snapshot_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/ec2_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
description:
- Whether the tags should be present or absent on the resource.
- The use of I(state=list) to interrogate the tags of an instance has been
deprecated and will be removed in Anisble 2.14. The 'list'
deprecated and will be removed after 2022-06-01. The 'list'
functionality has been moved to a dedicated module M(ec2_tag_info).
default: present
choices: ['present', 'absent', 'list']
Expand Down Expand Up @@ -158,7 +158,7 @@ def main():

if state == 'list':
module.deprecate(
'Using the "list" state has been deprecated. Please use the ec2_tag_info module instead', version='2.14')
'Using the "list" state has been deprecated. Please use the ec2_tag_info module instead', date='2022-06-01', collection_name='amazon.aws')
module.exit_json(changed=False, tags=current_tags)

add_tags, remove = compare_aws_tags(current_tags, tags, purge_tags=purge_tags)
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vol_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vol_facts':
module.deprecate("The 'ec2_vol_facts' module has been renamed to 'ec2_vol_info'", version='2.13')
module.deprecate("The 'ec2_vol_facts' module has been renamed to 'ec2_vol_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/ec2_vpc_dhcp_option_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def main():
supports_check_mode=True
)
if module._name == 'ec2_vpc_dhcp_option_facts':
module.deprecate("The 'ec2_vpc_dhcp_option_facts' module has been renamed to 'ec2_vpc_dhcp_option_info'", version='2.13')
module.deprecate("The 'ec2_vpc_dhcp_option_facts' module has been renamed to 'ec2_vpc_dhcp_option_info'",
date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_net_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def main():

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_net_facts':
module.deprecate("The 'ec2_vpc_net_facts' module has been renamed to 'ec2_vpc_net_info'", version='2.13')
module.deprecate("The 'ec2_vpc_net_facts' module has been renamed to 'ec2_vpc_net_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_subnet_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def main():
supports_check_mode=True
)
if module._name == 'ec2_vpc_subnet_facts':
module.deprecate("The 'ec2_vpc_subnet_facts' module has been renamed to 'ec2_vpc_subnet_info'", version='2.13')
module.deprecate("The 'ec2_vpc_subnet_facts' module has been renamed to 'ec2_vpc_subnet_info'", date='2021-12-01', collection_name='amazon.aws')

connection = module.client('ec2')

Expand Down