mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 05:43:26 +00:00
ipadnszone: Allow execution of plugin in client host.
Update dnszone README file and add tests for executing plugin with
`ipaapi_context` set to `client`.
A new test playbook can be found at:
tests/dnszone/test_dnszone_client_context.yml
The new test file can be executed in a FreeIPA client host that is
not a server. In this case, it should be defined in the `ipaclients`
group, in the inventory file.
Due to differences in data returned when running in a client context,
verification if zone is active had to be modified.
This commit is contained in:
@@ -405,7 +405,7 @@ class DNSZoneModule(FreeIPABaseModule):
|
||||
is_zone_active = False
|
||||
else:
|
||||
zone = response["result"]
|
||||
is_zone_active = zone.get("idnszoneactive") == ["TRUE"]
|
||||
is_zone_active = "TRUE" in zone.get("idnszoneactive")
|
||||
|
||||
return zone, is_zone_active
|
||||
|
||||
|
||||
Reference in New Issue
Block a user