Allow multiple dns zones to be absent.

This PR allow ipadnszone module to ensure that multiple dns zones
are absent at once, to be consistent with other ansible-freeipa
modules.

To fix this issue, it was required that custom arguents must be
passed using keyword arguments so that `get_ipa_command_args()`
is kept generic.
This commit is contained in:
Sergio Oliveira Campos
2020-08-03 11:54:44 -03:00
parent da5dc0c472
commit 75d16c2da4
4 changed files with 101 additions and 56 deletions

View File

@@ -506,7 +506,7 @@ class FreeIPABaseModule(AnsibleModule):
# when needed.
self.ipa_params = AnsibleFreeIPAParams(self)
def get_ipa_command_args(self):
def get_ipa_command_args(self, **kwargs):
"""
Return a dict to be passed to an IPA command.
@@ -538,7 +538,7 @@ class FreeIPABaseModule(AnsibleModule):
elif hasattr(self, param_name):
method = getattr(self, param_name)
if callable(method):
value = method()
value = method(**kwargs)
# We don't have a way to guess the value so fail.
else: