-
Notifications
You must be signed in to change notification settings - Fork 44
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
Setting token: 'ENV["VAULT_TOKEN"]' doesn't work #51
Comments
It has to be set within the context of the Puppetserver run as an environment variable, not hiera. So this could be done as
Or in the Environment/EnvironmentFile setting in the Puppetserver systemd unit file. |
Thank you for the quick response. I am using Ubuntu and on puppet enterprise. I went into
|
Remove the
|
When I remove the
|
Ok, looks like you're right: For Puppetserver the variable has to be set in the I did a quick test now and it worked for me: https://puppet.com/docs/puppetserver/latest/config_file_puppetserver.html
This will mean that it will use the value from the exported environmental setting within the JRuby run:
You'll need to restart the puppet and puppetserver processes after making the changes also. |
So I have set
|
Can you run this test for me:
|
Below are the outputs based on the commands you wanted me to run. Please not that, setting
|
@tenajsystems I think you have a double export command in your
Btw adding the |
Thank you. I decided to just have the token in a text file. |
@petems How is the ENV["VAULT_TOKEN"] supposed to be set? I have exported the token as
export VAULT_TOKEN=<token_here>
and in my hiera.yaml file, I havetoken: 'ENV["VAULT_TOKEN"]'
but when I run puppet, it fails to lookup the key in vault. Setting thetoken: '/path/to/token'
works however.Any thoughts on why setting
token: 'ENV["VAULT_TOKEN"]'
doesn't work? or I'm I doing something wrong?The text was updated successfully, but these errors were encountered: