mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 12:24:43 +00:00
ipareplica_setup_custodia: create_replica only available in newer releases
The check for the existence of get_custodia_instance in custodiainstance is not sufficient for the use od create_replica in CustodiaInstance. A new check for create_replica in CustodiaInstance has been added.
This commit is contained in:
@@ -185,7 +185,8 @@ def main():
|
|||||||
if not hasattr(custodiainstance, "get_custodia_instance"):
|
if not hasattr(custodiainstance, "get_custodia_instance"):
|
||||||
custodia = custodiainstance.CustodiaInstance(config.host_name,
|
custodia = custodiainstance.CustodiaInstance(config.host_name,
|
||||||
config.realm_name)
|
config.realm_name)
|
||||||
if promote:
|
if promote and \
|
||||||
|
hasattr(custodiainstance.CustodiaInstance, "create_replica"):
|
||||||
ansible_log.debug("-- CUSTODIA CREATE_REPLICA --")
|
ansible_log.debug("-- CUSTODIA CREATE_REPLICA --")
|
||||||
custodia.create_replica(config.master_host_name)
|
custodia.create_replica(config.master_host_name)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user