You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vault...@googlegroups.com
I'm using Ansible for configuration management with passwords being stored in plaintext in playbooks. What's the best way of reading secret strings and files from HashiCorp's vault and using them to populate placeholders in Ansible templates?
Jeff Mitchell
unread,
Jul 5, 2015, 12:40:12 PM7/5/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vault...@googlegroups.com
I'm not sure if there are any Vault modules for Ansible yet, but have
you looked at Ansible Vault (no relation to Hashicorp Vault)? It's a
built-in capability to Ansible that allows you to encrypt playbooks or
tasks so that passwords are not stored in plaintext. It would at least
be a good stopgap measure until something that more directly
interfaces between Ansible and (Hashicorp) Vault is available.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vault...@googlegroups.com
Yeah, I'm familiar with it, but it's not a complete solution, it only solves the problem for deployment and I like having SSOTs (https://en.wikipedia.org/wiki/Single_Source_of_Truth) for information, including passwords. I'd just like to skip using AnsiVault and go directly to HashiVault.
Armon Dadgar
unread,
Jul 6, 2015, 4:06:55 PM7/6/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vault...@googlegroups.com, ma...@alpha-force.net
The issue with using Ansible (or any CM tool) with Hashicorp Vault is that our Vault is more like
a database that is exposing dynamic data as opposed to simply storing static information. These
semantics are exposed in the form of secret leasing and dynamic secrets. The challenge with using
a CM tool is that they are out-of-band, making it difficult to handle things like secret leases.
Instead, the pattern we recommend (and use ourselves with Puppet) is to to setup consul-template
I'd like to dynamically write secrets, im wondering about scratching ansible lookups entirely and write a script that invokes the web api of hashi vault instead. That way I can query for a pw, if not exist dynamically generate it.
Johan Haals
unread,
May 6, 2016, 4:39:23 AM5/6/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
It's only for ansible 2.x however, make sure to create an issue if you got questions or feedback :)
Dave Cottlehuber
unread,
May 6, 2016, 4:53:18 AM5/6/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vault...@googlegroups.com
On Fri, 6 May 2016, at 10:39, Johan Haals wrote:
> Just a update that the latest release
> of https://github.com/jhaals/ansible-vault support dynamic secrets.
> It's only for ansible 2.x however, make sure to create an issue if you
> got
> questions or feedback :)
>
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vault
The hashi_vault plugin has some downsides, it has dependencies and can't handle dynamic secrets nor does it take VAULT_TOKEN from env.
I submitted a PR which gives the same functionality without dependencies https://github.com/ansible/ansible/pull/13907 It's tagged for the 2.1 milestone. I might update the PR with support for dynamic secrets but that will break compatibility with earlier 2.0 versions. I believe it's better to have the module outside core, it allow frequent updates and better flexibility since the module can be included in your config repo.
/Johan
Bill WANG
unread,
Jun 12, 2016, 9:52:31 PM6/12/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vault
Looks useful.
+1
Nathan Julsrud
unread,
Jul 6, 2016, 4:53:32 PM7/6/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vault
I like your work on this. I'm limited to ansible 1.9.6 right now until we vet out the SSH bugs in 2.0.
I'd really like the lookup plugin to inherit enough data from ansiblevault so that the user could just do something like {{ lookup('hashi_vault',"mysecret") }}
with the vault token and url pulled from ansible. Seems a limitation of 1.9.x