mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 05:22:05 +00:00
Merge pull request #916 from t-woerner/fix_ipasmartcard_client_for_ansible_fake_execution_test
ipasmartcard_client_get_vars: Fix for ansible-test fake execution test
This commit is contained in:
@@ -64,7 +64,13 @@ python_interpreter:
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ipaplatform.paths import paths
|
try:
|
||||||
|
from ipaplatform.paths import paths
|
||||||
|
except ImportError as _err:
|
||||||
|
MODULE_IMPORT_ERROR = str(_err)
|
||||||
|
paths = None
|
||||||
|
else:
|
||||||
|
MODULE_IMPORT_ERROR = None
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -73,6 +79,9 @@ def main():
|
|||||||
supports_check_mode=False,
|
supports_check_mode=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if MODULE_IMPORT_ERROR is not None:
|
||||||
|
ansible_module.fail_json(msg=MODULE_IMPORT_ERROR)
|
||||||
|
|
||||||
ansible_module.exit_json(changed=False,
|
ansible_module.exit_json(changed=False,
|
||||||
NSS_DB_DIR=paths.NSS_DB_DIR,
|
NSS_DB_DIR=paths.NSS_DB_DIR,
|
||||||
USE_AUTHSELECT=hasattr(paths, "AUTHSELECT"),
|
USE_AUTHSELECT=hasattr(paths, "AUTHSELECT"),
|
||||||
|
|||||||
Reference in New Issue
Block a user