mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-28 02:14:43 +00:00
Added support for client defined result data in FReeIPABaseModule
Modified support for processing result of IPA API commands so that client code can define its own processing and add return values to self.exit_args based on command result. If a subclass need to process the result of IPA API commands it should override the method `process_command_result`. The default implementation will simply evaluate if `changed` should be true.
This commit is contained in:
@@ -472,6 +472,14 @@ class DNSZoneModule(FreeIPABaseModule):
|
||||
}
|
||||
self.add_ipa_command("dnszone_mod", zone_name, args)
|
||||
|
||||
def process_command_result(self, name, command, args, result):
|
||||
super(DNSZoneModule, self).process_command_result(
|
||||
name, command, args, result
|
||||
)
|
||||
if command == "dnszone_add" and self.ipa_params.name_from_ip:
|
||||
dnszone_exit_args = self.exit_args.setdefault('dnszone', {})
|
||||
dnszone_exit_args['name'] = name
|
||||
|
||||
|
||||
def get_argument_spec():
|
||||
forwarder_spec = dict(
|
||||
|
||||
Reference in New Issue
Block a user