mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 11:54:47 +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 = 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):
|
||||||
|
|||||||
Reference in New Issue
Block a user