You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this puppet code, my goal is to preserve the variable $upstream that is written to the config file. However it is always substituted for the actual value. The reason for the substitution is detailed here
If you don't want it to interpolate and pass $upstream as is then surround it with single quotes, i.e. proxy => '$upstream', or escape the dollar sign so the string isn't treated as a variable: proxy => "\$upstream"
Using this puppet code, my goal is to preserve the variable $upstream that is written to the config file. However it is always substituted for the actual value. The reason for the substitution is detailed here
$upstream = "http://acme.unix.local"
nginx::resource::vhost { 'acme.co':
listen_port => 8080,
server_name => [
'www.acme.co'
],
proxy => "$upstream",
}
This is intended ,
location / {
proxy_pass $upstream;
}
Unfortunately I am getting this result ,
location / {
proxy_pass http://acme.unix.local;
}
Any suggestions welome
The text was updated successfully, but these errors were encountered: