mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
credstash lookup plugin: error out in run function when credstash not installed, not at module scope
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user