mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
ipareplica/library/ipareplica_custodia_import_dm_password: Fix post 4.7 use
custodiainstance.import_dm_password does not support master_host_name post 4.6.90 anymore. A new inspect call has been added to verify if the arg is supported or not.
This commit is contained in:
@@ -42,6 +42,8 @@ else:
|
|||||||
if NUM_VERSION >= 40600:
|
if NUM_VERSION >= 40600:
|
||||||
# IPA version >= 4.6
|
# IPA version >= 4.6
|
||||||
|
|
||||||
|
import inspect
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,8 @@ def main():
|
|||||||
|
|
||||||
ansible_log.debug("-- CUSTODIA IMPORT DM PASSWORD --")
|
ansible_log.debug("-- CUSTODIA IMPORT DM PASSWORD --")
|
||||||
|
|
||||||
if not hasattr(custodiainstance, "get_custodia_instance"):
|
argspec = inspect.getargspec(custodia.import_dm_password)
|
||||||
|
if "master_host_name" in argspec.args:
|
||||||
custodia.import_dm_password(config.master_host_name)
|
custodia.import_dm_password(config.master_host_name)
|
||||||
else:
|
else:
|
||||||
custodia.import_dm_password()
|
custodia.import_dm_password()
|
||||||
|
|||||||
Reference in New Issue
Block a user