Commit c4629b72 by Scott Cunningham

credstash lookup plugin: error out in run function when credstash not installed,…

credstash lookup plugin: error out in run function when credstash not installed, not at module scope
parent 934ce86d
......@@ -29,13 +29,12 @@ except ImportError:
CREDSTASH_INSTALLED = False
if not CREDSTASH_INSTALLED:
raise AnsibleError('The credstash lookup plugin requires credstash to be installed.')
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
if not CREDSTASH_INSTALLED:
raise AnsibleError('The credstash lookup plugin requires credstash to be installed.')
if isinstance(terms, basestring):
terms = [terms]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment