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

Clean up deprecations #504

Merged
472 changes: 100 additions & 372 deletions meta/runtime.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion plugins/cache/memcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def __init__(self, *args, **kwargs):
self._prefix = self.get_option('_prefix')
except KeyError:
display.deprecated('Rather than importing CacheModules directly, '
'use ansible.plugins.loader.cache_loader', version='2.12')
'use ansible.plugins.loader.cache_loader',
version='2.0.0', collection_name='community.general') # was Ansible 2.12
if C.CACHE_PLUGIN_CONNECTION:
connection = C.CACHE_PLUGIN_CONNECTION.split(',')
self._timeout = C.CACHE_PLUGIN_TIMEOUT
Expand Down
3 changes: 2 additions & 1 deletion plugins/cache/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def __init__(self, *args, **kwargs):
self._prefix = self.get_option('_prefix')
except KeyError:
display.deprecated('Rather than importing CacheModules directly, '
'use ansible.plugins.loader.cache_loader', version='2.12')
'use ansible.plugins.loader.cache_loader',
version='2.0.0', collection_name='community.general') # was Ansible 2.12
if C.CACHE_PLUGIN_CONNECTION:
uri = C.CACHE_PLUGIN_CONNECTION
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)
Expand Down
4 changes: 2 additions & 2 deletions plugins/callback/actionable.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- This callback suppresses any non Failed or Changed status.
deprecated:
why: The 'default' callback plugin now supports this functionality
removed_in: '2.11'
removed_in: '2.0.0' # was Ansible 2.11
alternative: "'default' callback plugin with 'display_skipped_hosts = no' and 'display_ok_hosts = no' options"
extends_documentation_fragment:
- default_callback
Expand All @@ -32,7 +32,7 @@
- name: DISPLAY_SKIPPED_HOSTS
deprecated:
why: environment variables without "ANSIBLE_" prefix are deprecated
version: "2.12"
version: "2.0.0" # was Ansible 2.12
alternatives: the "ANSIBLE_DISPLAY_SKIPPED_HOSTS" environment variable
- name: ANSIBLE_DISPLAY_SKIPPED_HOSTS
ini:
Expand Down
2 changes: 1 addition & 1 deletion plugins/callback/full_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- Use this plugin when you do not care about any output for tasks that were completely skipped
deprecated:
why: The 'default' callback plugin now supports this functionality
removed_in: '2.11'
removed_in: '2.0.0' # was Ansible 2.11
alternative: "'default' callback plugin with 'display_skipped_hosts = no' option"
extends_documentation_fragment:
- default_callback
Expand Down
2 changes: 1 addition & 1 deletion plugins/callback/stderr.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
short_description: Splits output, sending failed tasks to stderr
deprecated:
why: The 'default' callback plugin now supports this functionality
removed_in: '2.11'
removed_in: '2.0.0' # was Ansible 2.11
alternative: "'default' callback plugin with 'display_failed_stderr = yes' option"
extends_documentation_fragment:
- default_callback
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion plugins/lookup/gcp_storage_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- The name of the bucket.
required: false
extends_documentation_fragment:
- community.general.gcp
- community.general._gcp

'''

Expand Down
6 changes: 3 additions & 3 deletions plugins/module_utils/redfish_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _find_systems_resource(self):
'msg': "System resource %s not found" % self.resource_id}
elif len(self.systems_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'System'},
version='2.14')
version='3.0.0', collection_name='community.general') # was Ansible 2.14
return {'ret': True}

def _find_updateservice_resource(self):
Expand Down Expand Up @@ -296,7 +296,7 @@ def _find_chassis_resource(self):
'msg': "Chassis resource %s not found" % self.resource_id}
elif len(self.chassis_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Chassis'},
version='2.14')
version='3.0.0', collection_name='community.general') # was Ansible 2.14
return {'ret': True}

def _find_managers_resource(self):
Expand Down Expand Up @@ -326,7 +326,7 @@ def _find_managers_resource(self):
'msg': "Manager resource %s not found" % self.resource_id}
elif len(self.manager_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Manager'},
version='2.14')
version='3.0.0', collection_name='community.general') # was Ansible 2.14
return {'ret': True}

def _get_all_action_info_values(self, action):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cloud/alicloud/ali_instance_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'):
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'", version='2.13')
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

if HAS_FOOTMARK is False:
module.fail_json(msg=missing_required_lib('footmark'), exception=FOOTMARK_IMP_ERR)
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cloud/centurylink/clc_aa_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
choices: ['present','absent']
wait:
description:
- This option does nothing and will be removed in Ansible 2.14.
- This option does nothing and will be removed in community.general 3.0.0.
type: bool
requirements:
- python = 2.7
Expand Down Expand Up @@ -183,7 +183,7 @@ def _define_module_argument_spec():
argument_spec = dict(
name=dict(required=True),
location=dict(required=True),
wait=dict(type='bool', removed_in_version='2.14'),
wait=dict(type='bool', removed_in_version='3.0.0', removed_from_collection='community.general'), # was Ansible 2.14
state=dict(default='present', choices=['present', 'absent']),
)
return argument_spec
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/cloud/cloudscale/cloudscale_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
description:
- UUID of another server to create an anti-affinity group with.
- Mutually exclusive with I(server_groups).
- Deprecated, removed in version 2.11.
- Deprecated, removed in community.general 2.0.0.
type: str
server_groups:
description:
Expand Down Expand Up @@ -245,7 +245,7 @@
anti_affinity_with:
description:
- List of servers in the same anti-affinity group
- Deprecated, removed in version 2.11.
- Deprecated, removed in community.general 2.0.0.
returned: success when not state == absent
type: list
sample: []
Expand Down Expand Up @@ -521,7 +521,7 @@ def main():
use_public_network=dict(type='bool', default=True),
use_private_network=dict(type='bool', default=False),
use_ipv6=dict(type='bool', default=True),
anti_affinity_with=dict(removed_in_version='2.11'),
anti_affinity_with=dict(removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.11
server_groups=dict(type='list'),
user_data=dict(),
force=dict(type='bool', default=False),
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cloud/digital_ocean/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
module: digital_ocean
short_description: Create/delete a droplet/SSH_key in DigitalOcean
deprecated:
removed_in: '2.12'
removed_in: 2.0.0 # was Ansible 2.12
why: Updated module to remove external dependency with increased functionality.
alternative: Use M(digital_ocean_droplet) instead.
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def main():
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_account_facts', 'community.general.digital_ocean_account_facts'):
module.deprecate("The 'digital_ocean_account_facts' module has been renamed to 'digital_ocean_account_info'", version='2.13')
module.deprecate("The 'digital_ocean_account_facts' module has been renamed to 'digital_ocean_account_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
try:
core(module)
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_certificate_facts', 'community.general.digital_ocean_certificate_facts'):
module.deprecate("The 'digital_ocean_certificate_facts' module has been renamed to 'digital_ocean_certificate_info'", version='2.13')
module.deprecate("The 'digital_ocean_certificate_facts' module has been renamed to 'digital_ocean_certificate_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_domain_facts', 'community.general.digital_ocean_domain_facts'):
module.deprecate("The 'digital_ocean_domain_facts' module has been renamed to 'digital_ocean_domain_info'", version='2.13')
module.deprecate("The 'digital_ocean_domain_facts' module has been renamed to 'digital_ocean_domain_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_firewall_facts', 'community.general.digital_ocean_firewall_facts'):
module.deprecate("The 'digital_ocean_firewall_facts' module has been renamed to 'digital_ocean_firewall_info'", version='2.13')
module.deprecate("The 'digital_ocean_firewall_facts' module has been renamed to 'digital_ocean_firewall_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def main():
argument_spec=DigitalOceanHelper.digital_ocean_argument_spec()
)
if module._name in ('digital_ocean_floating_ip_facts', 'community.general.digital_ocean_floating_ip_facts'):
module.deprecate("The 'digital_ocean_floating_ip_facts' module has been renamed to 'digital_ocean_floating_ip_info'", version='2.13')
module.deprecate("The 'digital_ocean_floating_ip_facts' module has been renamed to 'digital_ocean_floating_ip_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def main():

module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_image_facts', 'community.general.digital_ocean_image_facts'):
module.deprecate("The 'digital_ocean_image_facts' module has been renamed to 'digital_ocean_image_info'", version='2.13')
module.deprecate("The 'digital_ocean_image_facts' module has been renamed to 'digital_ocean_image_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_load_balancer_facts', 'community.general.digital_ocean_load_balancer_facts'):
module.deprecate("The 'digital_ocean_load_balancer_facts' module has been renamed to 'digital_ocean_load_balancer_info'", version='2.13')
module.deprecate("The 'digital_ocean_load_balancer_facts' module has been renamed to 'digital_ocean_load_balancer_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def main():
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_region_facts', 'community.general.digital_ocean_region_facts'):
module.deprecate("The 'digital_ocean_region_facts' module has been renamed to 'digital_ocean_region_info'", version='2.13')
module.deprecate("The 'digital_ocean_region_facts' module has been renamed to 'digital_ocean_region_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def main():
argument_spec=argument_spec,
)
if module._name in ('digital_ocean_size_facts', 'community.general.digital_ocean_size_facts'):
module.deprecate("The 'digital_ocean_size_facts' module has been renamed to 'digital_ocean_size_info'", version='2.13')
module.deprecate("The 'digital_ocean_size_facts' module has been renamed to 'digital_ocean_size_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def main():
],
)
if module._name in ('digital_ocean_snapshot_facts', 'community.general.digital_ocean_snapshot_facts'):
module.deprecate("The 'digital_ocean_snapshot_facts' module has been renamed to 'digital_ocean_snapshot_info'", version='2.13')
module.deprecate("The 'digital_ocean_snapshot_facts' module has been renamed to 'digital_ocean_snapshot_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
---
module: digital_ocean_sshkey_facts
deprecated:
removed_in: '2.13'
removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module.
alternative: Use M(digital_ocean_sshkey_info) instead.
short_description: DigitalOcean SSH keys facts
Expand Down Expand Up @@ -91,7 +91,8 @@ def main():
supports_check_mode=False,
)

module.deprecate("The 'digital_ocean_sshkey_facts' module has been deprecated, use the new 'digital_ocean_sshkey_info' module", version='2.13')
module.deprecate("The 'digital_ocean_sshkey_facts' module has been deprecated, use the new 'digital_ocean_sshkey_info' module",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

core(module)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_tag_facts', 'community.general.digital_ocean_tag_facts'):
module.deprecate("The 'digital_ocean_tag_facts' module has been renamed to 'digital_ocean_tag_info'", version='2.13')
module.deprecate("The 'digital_ocean_tag_facts' module has been renamed to 'digital_ocean_tag_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def main():
)
module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_volume_facts', 'community.general.digital_ocean_volume_facts'):
module.deprecate("The 'digital_ocean_volume_facts' module has been renamed to 'digital_ocean_volume_info'", version='2.13')
module.deprecate("The 'digital_ocean_volume_facts' module has been renamed to 'digital_ocean_volume_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

try:
core(module)
Expand Down
5 changes: 3 additions & 2 deletions plugins/modules/cloud/docker/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
- A dictionary mapping the service's name to a dictionary of containers.
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
are also accessible directly. The service's name is the variable with which the container dictionary
can be accessed. Note that the returned facts will be removed in Ansible 2.12.
can be accessed. Note that the returned facts will be removed in community.general 2.0.0.
returned: success
type: complex
contains:
Expand Down Expand Up @@ -1136,7 +1136,8 @@ def main():
min_docker_api_version='1.20',
)
if client.module._name in ('docker_service', 'community.general.docker_service'):
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.", version='2.12')
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.",
version='2.0.0', collection_name='community.general') # was Ansible 2.12

try:
result = ContainerManager(client).exec_module()
Expand Down
Loading