From 14901b65d9168ace62f4e9bac0bfa379c24ebd67 Mon Sep 17 00:00:00 2001 From: victoru Date: Thu, 4 Aug 2016 12:06:12 -0500 Subject: [PATCH] raise AnsibleError in hashi_vault lookup plugin when hvac module is not installed (#16859) --- lib/ansible/plugins/lookup/hashi_vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/hashi_vault.py b/lib/ansible/plugins/lookup/hashi_vault.py index 4c37d4e1991..e1953fea184 100644 --- a/lib/ansible/plugins/lookup/hashi_vault.py +++ b/lib/ansible/plugins/lookup/hashi_vault.py @@ -45,7 +45,7 @@ class HashiVault: try: import hvac except ImportError: - AnsibleError("Please pip install hvac to use this module") + raise AnsibleError("Please pip install hvac to use this module") self.url = kwargs.get('url', ANSIBLE_HASHI_VAULT_ADDR)