
Dynamic scoping for variables in ERB templates was removed in puppet 4[1] which means that the variables defined in the refstack::apache::http* classes cannot be found when it is referenced in the httpd::vhost defined type and will be evaluated as nil when puppet runs. Use scope.lookupvar instead to be explicit about the variable's source. [1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb Change-Id: Ie4ebcce043c8b1ed28d42f58fe15502cac956b48
20 lines
842 B
Plaintext
20 lines
842 B
Plaintext
<VirtualHost <%= scope.lookupvar('::refstack::apache::http::hostname') %>:80>
|
|
<% if !!scope.lookupvar('::refstack::apache::http::server_admin') %>
|
|
ServerAdmin <%= scope.lookupvar('::refstack::apache::http::server_admin') %>
|
|
<% end %>
|
|
ServerName <%= scope.lookupvar('::refstack::apache::http::hostname') %>
|
|
|
|
DocumentRoot <%= scope.lookupvar('::refstack::apache::http::install_www_root') %>
|
|
|
|
WSGIDaemonProcess refstack user=<%= scope.lookupvar('::refstack::apache::http::user') %> group=<%= scope.lookupvar('::refstack::apache::http::group') %> threads=5
|
|
WSGIScriptAlias /api /etc/refstack/app.wsgi
|
|
WSGIPassAuthorization On
|
|
LogLevel warn
|
|
ErrorLog ${APACHE_LOG_DIR}/refstack-error.log
|
|
CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined
|
|
|
|
<Directory "/etc/refstack">
|
|
Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|