mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
dig lookup: deprecate DLV record type (#4618)
* Deprecate DLV record type. * Use correct name.
This commit is contained in:
parent
9462506edc
commit
b711038b3b
2 changed files with 16 additions and 3 deletions
2
changelogs/fragments/4618-dig-dlv.yml
Normal file
2
changelogs/fragments/4618-dig-dlv.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
deprecated_features:
|
||||||
|
- "dig lookup plugin - the ``DLV`` record type has been decommissioned in 2017 and support for it will be removed from community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4618)."
|
|
@ -27,13 +27,15 @@ DOCUMENTATION = '''
|
||||||
This needs to be passed-in as an additional parameter to the lookup
|
This needs to be passed-in as an additional parameter to the lookup
|
||||||
options:
|
options:
|
||||||
_terms:
|
_terms:
|
||||||
description: domain(s) to query
|
description: Domain(s) to query.
|
||||||
qtype:
|
qtype:
|
||||||
description: record type to query
|
description:
|
||||||
|
- Record type to query.
|
||||||
|
- C(DLV) is deprecated and will be removed in community.general 6.0.0.
|
||||||
default: 'A'
|
default: 'A'
|
||||||
choices: [A, ALL, AAAA, CNAME, DNAME, DLV, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT]
|
choices: [A, ALL, AAAA, CNAME, DNAME, DLV, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT]
|
||||||
flat:
|
flat:
|
||||||
description: If 0 each record is returned as a dictionary, otherwise a string
|
description: If 0 each record is returned as a dictionary, otherwise a string.
|
||||||
default: 1
|
default: 1
|
||||||
retry_servfail:
|
retry_servfail:
|
||||||
description: Retry a nameserver if it returns SERVFAIL.
|
description: Retry a nameserver if it returns SERVFAIL.
|
||||||
|
@ -163,6 +165,7 @@ RETURN = """
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
|
from ansible.utils.display import Display
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -178,6 +181,9 @@ except ImportError:
|
||||||
HAVE_DNS = False
|
HAVE_DNS = False
|
||||||
|
|
||||||
|
|
||||||
|
display = Display()
|
||||||
|
|
||||||
|
|
||||||
def make_rdata_dict(rdata):
|
def make_rdata_dict(rdata):
|
||||||
''' While the 'dig' lookup plugin supports anything which dnspython supports
|
''' While the 'dig' lookup plugin supports anything which dnspython supports
|
||||||
out of the box, the following supported_types list describes which
|
out of the box, the following supported_types list describes which
|
||||||
|
@ -326,6 +332,11 @@ class LookupModule(LookupBase):
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
|
if qtype.upper() == 'DLV':
|
||||||
|
display.deprecated('The DLV record type has been decommissioned in 2017 and support for'
|
||||||
|
' it will be removed from community.general 6.0.0',
|
||||||
|
version='6.0.0', collection_name='community.general')
|
||||||
|
|
||||||
if qtype.upper() == 'PTR':
|
if qtype.upper() == 'PTR':
|
||||||
try:
|
try:
|
||||||
n = dns.reversename.from_address(domain)
|
n = dns.reversename.from_address(domain)
|
||||||
|
|
Loading…
Reference in a new issue