mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
dig: Fix evaluation of boolean parameters (#5129)
* Add lookup_dig tests * Fix boolean evaluation * Add changelog fragment * Apply review changes * Add license
This commit is contained in:
parent
98ea27847f
commit
3c2d7eb193
5 changed files with 55 additions and 2 deletions
|
@ -172,6 +172,7 @@ RETURN = """
|
|||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
from ansible.utils.display import Display
|
||||
import socket
|
||||
|
||||
|
@ -321,9 +322,9 @@ class LookupModule(LookupBase):
|
|||
except Exception as e:
|
||||
raise AnsibleError("dns lookup illegal CLASS: %s" % to_native(e))
|
||||
elif opt == 'retry_servfail':
|
||||
myres.retry_servfail = bool(arg)
|
||||
myres.retry_servfail = boolean(arg)
|
||||
elif opt == 'fail_on_error':
|
||||
fail_on_error = bool(arg)
|
||||
fail_on_error = boolean(arg)
|
||||
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue