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:
Rafael Guterres Jeffman
2022-09-27 10:56:10 -03:00
committed by GitHub

View File

@@ -64,7 +64,13 @@ python_interpreter:
import sys
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():
@@ -73,6 +79,9 @@ def main():
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,
NSS_DB_DIR=paths.NSS_DB_DIR,
USE_AUTHSELECT=hasattr(paths, "AUTHSELECT"),