mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-23 09:14:43 +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)
|
msg="File %s does not exist." % options.dirsrv_config_file)
|
||||||
|
|
||||||
# domain_name
|
# 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:
|
try:
|
||||||
check_zone_overlap(options.domain_name, False)
|
check_zone_overlap(options.domain_name, False)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
if "already exists in DNS" in str(e):
|
ansible_module.fail_json(str(e))
|
||||||
ansible_module.log(str(e))
|
|
||||||
ansible_module.exit_json(changed=False, dns_zone_exists=True)
|
|
||||||
raise
|
|
||||||
|
|
||||||
# dm_password
|
# dm_password
|
||||||
with redirect_stdout(ansible_log):
|
with redirect_stdout(ansible_log):
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
register: result_ipaserver_test
|
register: result_ipaserver_test
|
||||||
|
|
||||||
- meta: end_play
|
- 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:
|
- block:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user