jhaals / ansible-vault

ansible lookup plugin for secrets stored in Vault(by HashiCorp)
BSD 3-Clause "New" or "Revised" License
347 stars 65 forks source link

Made Ansible2 able to work with Ansible1 lookup syntax #55

Closed dervolker closed 7 years ago

dervolker commented 7 years ago

Hello Johan,

we have several projects with Ansible 1 lookups. Now we want to switch to Ansible 2 without forcing several teams to touch their code and/or break their builds. Therefore I added this patch to make Ansible 2 able to work with an Ansible 1 lookup. It would be nice to have this in the upstream.

Kind regards, Volker

jhaals commented 7 years ago

Hi Volker, Thanks for the pull request. I just tried running test.sh it with 1.9.6 and it fails with fatal: [localhost] => Failed to template msg="{{ lookup('vault', 'secret/hello', 'value') }}": Unexpected error in during lookup: run() got multiple values for keyword argument 'inject' This error is unrelated to what you've submitted. Do you have any idea why it's failing? I'm considering dropping 1.9 and all the glue code that makes both work since 2.0 has been out for quite some time now.