-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use dotenv with ansible? #175
Comments
Ansible is very flexible and powerful with the way it uses variables. I love |
I've never used Ansible, so I'll defer to @nickhammond. You can use the dotenv executable to set variables for any other command:
|
@npearson72 If you do end up needing to do this, you'll just need to use the lookup method(example), something like this: .env
ansible playbook:
|
I've bee really busy lately, so have just know had a chance to try this out. Works like a charm. Thanks guys! |
I get this:
|
@wayne-o Does running just |
I currently have variables in a yaml file that ansible uses. I'd like to consolidate all my variables into a common format, and am looking into dotenv. Does anyone know if it's possible for ansible to access the dotenv variables?
In the documentation it mentioned using the
dotenv
executable. Is that a way to instantiate the variables in memory for whatever script I'm running -- even if it's not a ruby script?The text was updated successfully, but these errors were encountered: