Closed lukasmrtvy closed 7 years ago
If you figure this out, please reply back to the thread. I'm actually trying to do this as well.
Correcting my previous comment, surely you need to use environment: in the first debug command too?
Edit: hmm, see what you mean, complains about in VAULT_ADDR variable here too
The issue is that when you're setting environment variables like this, you are setting them on the remote host. The environment variables that control Vault need to be set on the deploy (local) host.
As of #27, you can now set vault_addr
, vault_cacert
, and vault_capath
as Ansible variables.
Note that vault_token is explicitly left out of that list. However, as of #25 you can now set that via the file ~/.vault_token
I consider this to be fixed thanks to @richfromm
Is possible to use environment variables in ansible playbook? Just like my example? Because i cant get it work...