mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 21:33:14 +00:00
ipaserver: Transform DNS overlap end_play into a failure
This is more like the normal installer behavior and should also help with issue #50: https://github.com/freeipa/ansible-freeipa/issues/50
This commit is contained in:
@@ -256,14 +256,12 @@ def main():
|
||||
msg="File %s does not exist." % options.dirsrv_config_file)
|
||||
|
||||
# domain_name
|
||||
if (options.setup_dns and not options.allow_zone_overlap):
|
||||
if (options.setup_dns and not options.allow_zone_overlap and \
|
||||
options.domain_name is not None):
|
||||
try:
|
||||
check_zone_overlap(options.domain_name, False)
|
||||
except ValueError as e:
|
||||
if "already exists in DNS" in str(e):
|
||||
ansible_module.log(str(e))
|
||||
ansible_module.exit_json(changed=False, dns_zone_exists=True)
|
||||
raise
|
||||
ansible_module.fail_json(str(e))
|
||||
|
||||
# dm_password
|
||||
with redirect_stdout(ansible_log):
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
register: result_ipaserver_test
|
||||
|
||||
- meta: end_play
|
||||
when: not result_ipaserver_test.changed and (result_ipaserver_test.dns_zone_exists is defined or result_ipaserver_test.client_already_configured is defined or result_ipaserver_test.server_already_configured is defined)
|
||||
when: not result_ipaserver_test.changed and (result_ipaserver_test.client_already_configured is defined or result_ipaserver_test.server_already_configured is defined)
|
||||
|
||||
- block:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user