diff --git a/changelogs/fragments/3267-dnsimple1-deprecation.yml b/changelogs/fragments/3267-dnsimple1-deprecation.yml new file mode 100644 index 0000000000..dadc1d2901 --- /dev/null +++ b/changelogs/fragments/3267-dnsimple1-deprecation.yml @@ -0,0 +1,3 @@ +--- +deprecated_features: + - "dnsimple - python-dnsimple < 2.0.0 is deprecated and support for it will be removed in community.general 5.0.0 (https://github.com/ansible-collections/community.general/pull/2946#discussion_r667624693)." diff --git a/plugins/modules/net_tools/dnsimple.py b/plugins/modules/net_tools/dnsimple.py index 188f9fd64a..3681348f4e 100644 --- a/plugins/modules/net_tools/dnsimple.py +++ b/plugins/modules/net_tools/dnsimple.py @@ -82,6 +82,8 @@ options: version_added: 3.5.0 requirements: - "dnsimple >= 1.0.0" +notes: + - "Support for C(dnsimple < 2) is deprecated and will be removed in community.general 5.0.0." author: "Alex Coomans (@drcapulet)" ''' @@ -402,6 +404,11 @@ def main(): if DNSIMPLE_MAJOR_VERSION > 1: ds = DNSimpleV2(account_email, account_api_token, sandbox, module) else: + module.deprecate( + 'Support for python-dnsimple < 2 is deprecated. ' + 'Update python-dnsimple to version >= 2.0.0', + version='5.0.0', collection_name='community.general' + ) ds = DNSimpleV1(account_email, account_api_token, sandbox, module) # Let's figure out what operation we want to do # No domain, return a list