0

Is there a way to specify a password for the userlist from an environment variable. All of the following seem not to work:

userlist UsersFor_Frontend
  user admin insecure-password ${ENV_PASSWORD}
  user admin insecure-password env(ENV_PASSWORD)
  user admin insecure-password { env(ENV_PASSWORD) }
FibHeap
  • 101
  • 1

1 Answers1

0

Do environment variables work in other parts of the conf file? If not, this is a duplicate, check How can I use environment variables in haproxy.conf and Using HaProxy environmental variables in haproxy.cfg not working

(Basically, you need to make sure you use ver >= 1.5, that the conf file is actually used and set the environment variables correctly - try "cat /proc/$(pgrep haproxy)/environ" - you should see the environment variables there.)

Jan Klos
  • 44
  • 2
  • yes variables work in other parts. I use them for address and ports in the backend and I use them for an if for the acl (i.e the one to turn on or of basic auth). But I can not set the password. In all of the cases above the password ends up to be the string writen there i.e (${ENV_PASSWORD}) – FibHeap Sep 08 '15 at 13:06