From 08ae111757528f9419bf1ab2198425e3e1dbeb3d 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) (cherry picked from commit 14901b65d9168ace62f4e9bac0bfa379c24ebd67) --- 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 4e09d0c7b22..13a81ee4013 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.pop('url') self.secret = kwargs.pop('secret')