ipareplica_prepare: Properly fail if replica_conn_check failed

If replica_conn_check failed a back trace was printed instead of a proper
failure in ansible. Thias has been fixed.
This commit is contained in:
Thomas Woerner
2019-04-03 18:08:34 +02:00
parent 44ce7263de
commit 7a2d2c5236

View File

@@ -660,6 +660,8 @@ def main():
config.realm_name, options.setup_ca, 389,
options.admin_password, principal=options.principal,
ca_cert_file=cafile)
except ScriptError as e:
ansible_module.fail_json(msg=str(e))
finally:
if add_to_ipaservers:
os.environ['KRB5CCNAME'] = ccache