diff --git a/ansible_collections/arista/cvp/plugins/module_utils/tools_cv.py b/ansible_collections/arista/cvp/plugins/module_utils/tools_cv.py index fe047b94d..658d76e94 100644 --- a/ansible_collections/arista/cvp/plugins/module_utils/tools_cv.py +++ b/ansible_collections/arista/cvp/plugins/module_utils/tools_cv.py @@ -38,6 +38,8 @@ def cv_connect(module): CvpClient Instanciated CvpClient with connection information. """ + if not HAS_CVPRAC: + module.fail_json(msg=str('cvprac required for this module. Please install using pip install cvprac')) client = CvpClient() LOGGER.info('Connecting to CVP') connection = Connection(module._socket_path)