Skip to content
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

Can't load environment variables from /etc/sysconfig/puppet #87

Open
roy-themachine opened this issue Oct 11, 2023 · 1 comment
Open

Comments

@roy-themachine
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: puppetserver version: 7.13.0
  • Distribution: Centos9

How to reproduce (e.g Puppet code you use)

I've happened the following lines in /etc/sysconfig/puppet on the puppet server
VAULT_ADDR=https://xxxx:8200/
VAULT_NAMESPACE=admin/puppet
VAULT_AUTH_METHOD=approle
VAULT_ROLE_ID=xxxxxx..xxxx
VAULT_SECRET_ID=xxxx..xxx

What are you seeing

The module does not load the environment variable.

What behaviour did you expect instead

For the module to load these environment variables

@atoy40
Copy link

atoy40 commented Nov 17, 2023

@roy-themachine environment variables have to be set on the puppet client, not the server. Lookup function is executed (defered) on the client.

Btw, I'm also having problem with env vars. On a debian puppet client, I've try :

root@client:~$ VAULT_ADDR=https://my.vault.addr:8200 puppet agent --test

but I got this error : No vault_addr given and VAULT_ADDR env variable not set

It works perfect if I set the vault_addr directly in the lookup call. I've also try to export the env var or to define it into /etc/default/puppet .... but same error here.

Thanks
Anthony.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants