Skip to content
Snippets Groups Projects
Commit cd96c8a0 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

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
parent 785cff9a
Branches
Tags
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment