mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
dnsrecord: Use IPAAnsibleModule method to validate arguments.
Use the IPAAnsibleModule.params_fail_if_used method to validate arguments provided by user.
This commit is contained in:
@@ -1201,11 +1201,7 @@ def check_parameters(module, state, zone_name, record):
|
||||
invalid = list(_PART_MAP.keys())
|
||||
invalid.extend(['create_reverse', 'dns_ttl'])
|
||||
|
||||
for x in invalid:
|
||||
if x in record:
|
||||
module.fail_json(
|
||||
msg="Variable `%s` cannot be used in state `%s`" %
|
||||
(x, state))
|
||||
module.params_fail_used_invalid(invalid, state)
|
||||
|
||||
|
||||
def get_entry_from_module(module, name):
|
||||
|
||||
Reference in New Issue
Block a user