Fix ssl lookups

I think I chose a bad example to cargo-cult copy from in
Ic133e3abc09343541210c061af544f7b37480f27; the variables are not being
found.  Use scope.lookupvar() (the once place where I did use this is
working).

Change-Id: If3af4eb6a7d29ddde16f08cb7f55e64ad058d12d
This commit is contained in:
Ian Wienand 2019-04-12 11:37:24 +10:00
parent d6368cf248
commit 8a0e111327
1 changed files with 4 additions and 7 deletions

View File

@ -9,13 +9,10 @@
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile <%= @ssl_cert_file %>
SSLCertificateKeyFile <%= @ssl_key_file %>
<%# The original default was '' -%>
<%# scope.lookupvar returns nil for an undefined variable in puppet 4 -%>
<%# scope.lookupvar returns :undef for an undefined variable in puppet 3 -%>
<% unless ['', nil, :undef].include?@ssl_chain_file %>
SSLCertificateChainFile <%= @ssl_chain_file %>
SSLCertificateFile <%= scope.lookupvar("graphite::ssl_cert_file") %>
SSLCertificateKeyFile <%= scope.lookupvar("graphite::ssl_key_file") %>
<% if scope.lookupvar("graphite::ssl_chain_file") != "" %>
SSLCertificateChainFile <%= scope.lookupvar("graphite::ssl_chain_file") %>
<% end %>
SSLProtocol All -SSLv2 -SSLv3
# Note: this list should ensure ciphers that provide forward secrecy