mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-15 05:52:24 +00:00
ipareplica_test: Dop not fail, but end play if replica is already installed
Up to now the try to deploy an already deployed replica resulted in an error. Now this ends in an end play and no error is reported.
This commit is contained in:
@@ -297,7 +297,12 @@ def main():
|
||||
with redirect_stdout(ansible_log):
|
||||
common_check(options.no_ntp)
|
||||
except Exception as msg: #ScriptError as msg:
|
||||
ansible_module.fail_json(msg=str(msg))
|
||||
_msg = str(msg)
|
||||
if "server is already configured" in _msg:
|
||||
ansible_module.exit_json(changed=False,
|
||||
server_already_configured=True)
|
||||
else:
|
||||
ansible_module.fail_json(msg=_msg)
|
||||
|
||||
# TODO: Check ntp_servers and ntp_pool
|
||||
|
||||
@@ -321,7 +326,7 @@ def main():
|
||||
|
||||
# done #
|
||||
|
||||
ansible_module.exit_json(changed=True,
|
||||
ansible_module.exit_json(changed=False,
|
||||
ipa_python_version=IPA_PYTHON_VERSION,
|
||||
### basic ###
|
||||
domain=options.domain_name,
|
||||
|
||||
Reference in New Issue
Block a user