mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 03:44:41 +00:00
ipaserver: Do no use IPA version to check for get_custodia_instance existance
The use of IPA versions to determine if get_custodia_instance should be used was not optimal as the patch that introduced this has been back-ported to the EL-7 package with verion 4.5.4. As get_custodia_instance was not available before we can simply check if get_custodia_instance exists in custodiainstance.
This commit is contained in:
@@ -188,7 +188,7 @@ def main():
|
|||||||
# setup CA ##############################################################
|
# setup CA ##############################################################
|
||||||
|
|
||||||
with redirect_stdout(ansible_log):
|
with redirect_stdout(ansible_log):
|
||||||
if NUM_VERSION >= 40504:
|
if hasattr(custodiainstance, "get_custodia_instance"):
|
||||||
custodia = custodiainstance.get_custodia_instance(
|
custodia = custodiainstance.get_custodia_instance(
|
||||||
options, custodiainstance.CustodiaModes.MASTER_PEER)
|
options, custodiainstance.CustodiaModes.MASTER_PEER)
|
||||||
custodia.create_instance()
|
custodia.create_instance()
|
||||||
@@ -200,7 +200,7 @@ def main():
|
|||||||
if n in options.__dict__}
|
if n in options.__dict__}
|
||||||
write_cache(cache_vars)
|
write_cache(cache_vars)
|
||||||
|
|
||||||
if NUM_VERSION >= 40504:
|
if hasattr(custodiainstance, "get_custodia_instance"):
|
||||||
ca.install_step_0(False, None, options, custodia=custodia)
|
ca.install_step_0(False, None, options, custodia=custodia)
|
||||||
else:
|
else:
|
||||||
ca.install_step_0(False, None, options)
|
ca.install_step_0(False, None, options)
|
||||||
@@ -225,7 +225,7 @@ def main():
|
|||||||
|
|
||||||
if options.setup_ca:
|
if options.setup_ca:
|
||||||
with redirect_stdout(ansible_log):
|
with redirect_stdout(ansible_log):
|
||||||
if NUM_VERSION >= 40504:
|
if hasattr(custodiainstance, "get_custodia_instance"):
|
||||||
ca.install_step_1(False, None, options, custodia=custodia)
|
ca.install_step_1(False, None, options, custodia=custodia)
|
||||||
else:
|
else:
|
||||||
ca.install_step_1(False, None, options)
|
ca.install_step_1(False, None, options)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ def main():
|
|||||||
# setup kra #####################################################
|
# setup kra #####################################################
|
||||||
|
|
||||||
with redirect_stdout(ansible_log):
|
with redirect_stdout(ansible_log):
|
||||||
if NUM_VERSION >= 40504:
|
if hasattr(custodiainstance, "get_custodia_instance"):
|
||||||
custodia = custodiainstance.get_custodia_instance(
|
custodia = custodiainstance.get_custodia_instance(
|
||||||
options, custodiainstance.CustodiaModes.MASTER_PEER)
|
options, custodiainstance.CustodiaModes.MASTER_PEER)
|
||||||
custodia.create_instance()
|
custodia.create_instance()
|
||||||
|
|||||||
Reference in New Issue
Block a user