
Dynamic scoping for variables in ERB templates was removed in puppet 4[1], so look up the variables from the scope object. [1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb Change-Id: I1bc639b7cecf9a0ec3b14362e11f645a3c11ddb4
23 lines
896 B
Plaintext
23 lines
896 B
Plaintext
<% unless [443, 80].include?(scope.lookupvar("::openstack_health::vhost::vhost_port").to_i) %>
|
|
Listen <%= scope.lookupvar("::openstack_health::vhost::vhost_port") %>
|
|
<% end %>
|
|
<VirtualHost *:<%= scope.lookupvar("::openstack_health::vhost::vhost_port") %>>
|
|
ServerName <%= scope.lookupvar("::openstack_health::vhost::vhost_name") %>
|
|
ServerAdmin <%= scope.lookupvar("::openstack_health::vhost::serveradmin") %>
|
|
|
|
LogLevel info
|
|
CustomLog ${APACHE_LOG_DIR}/openstack-health-frontend-access.log combined
|
|
ErrorLog ${APACHE_LOG_DIR}/openstack-health-frontend-error.log
|
|
|
|
<Directory <%= scope.lookupvar('::openstack_health::vhost::frontend_dir') %>>
|
|
Order allow,deny
|
|
Allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
DocumentRoot <%= scope.lookupvar('::openstack_health::vhost::frontend_dir') %>
|
|
DirectoryIndex index.html
|
|
</VirtualHost>
|