Skip to content
Snippets Groups Projects
Commit 6f7b514e authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

dnsrecord: Use IPAAnsibleModule method to validate arguments.

Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
parent 67282b1a
No related branches found
No related tags found
No related merge requests found
...@@ -1201,11 +1201,7 @@ def check_parameters(module, state, zone_name, record): ...@@ -1201,11 +1201,7 @@ def check_parameters(module, state, zone_name, record):
invalid = list(_PART_MAP.keys()) invalid = list(_PART_MAP.keys())
invalid.extend(['create_reverse', 'dns_ttl']) invalid.extend(['create_reverse', 'dns_ttl'])
for x in invalid: module.params_fail_used_invalid(invalid, state)
if x in record:
module.fail_json(
msg="Variable `%s` cannot be used in state `%s`" %
(x, state))
def get_entry_from_module(module, name): def get_entry_from_module(module, name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment