Commit Graph

8 Commits (0b070a04d03d7cef544236bc5acad80c418248f1)

Author SHA1 Message Date
Michel Alexandre Salim afb2abf980 Make credstash lookup plugin support encryption contexts
Previously, the lookup plugin passes all its keyword arguments to
credstash's `getSecret`; while this works for passing the standard
parameters (version, region and table), this does not allow passing
a dictionary of key-value pairs as `getSecret`'s context parameter.

Instead, pop `version`, `region` and `table` from `kwargs`, supplying
the default value if they are not defined, and pass the rest of the `kwargs`
as the `context` parameter.
2016-01-02 15:23:27 +07:00
Marius Gedminas 0c6ce31f76 Use 'except ... as' syntax
This syntax works on Python 2.6 through 3.x.  lib/ansible/module_utils
(and lib/ansible/modules) need to support Python 2.4, so I didn't touch
those.
2015-08-27 22:15:04 +03:00
Toshio Kuratomi d35b956900 listify lookup plugin terms when they're specified as "{{ lookup(terms) }}"
Before this, they were not listified there but they were listified when
specified like this:

with_lookup: terms
2015-08-10 09:07:37 -07:00
Scott Cunningham 87ef53c962 credstash lookup plugin: python 2.6-compatible string.format() 2015-08-05 23:40:43 -07:00
Scott Cunningham c4629b72e0 credstash lookup plugin: error out in run function when credstash not installed, not at module scope 2015-08-05 23:37:10 -07:00
Scott Cunningham 934ce86d35 update credstash lookup plugin to use Python 2.4-compatible exception catching 2015-08-04 18:29:37 -07:00
Scott Cunningham 193e857bc4 credstash lookup plugin: raise AnsibleError when credstash library not installed 2015-07-30 21:04:26 +01:00
Scott Cunningham 695e456cb0 add credstash lookup plugin 2015-07-29 11:18:13 +01:00