Merge pull request #13709 from traveloka/credstash-support-encr-context

Make credstash lookup plugin support encryption contexts
pull/14952/head
James Cammarata 9 years ago committed by GitHub
commit aefa12a20f

@ -38,7 +38,11 @@ class LookupModule(LookupBase):
ret = [] ret = []
for term in terms: for term in terms:
try: try:
val = credstash.getSecret(term, **kwargs) version = kwargs.pop('version', '')
region = kwargs.pop('region', None)
table = kwargs.pop('table', 'credential-store')
val = credstash.getSecret(term, version, region, table,
context=kwargs)
except credstash.ItemNotFound: except credstash.ItemNotFound:
raise AnsibleError('Key {0} not found'.format(term)) raise AnsibleError('Key {0} not found'.format(term))
except Exception as e: except Exception as e:

Loading…
Cancel
Save