From 8a0e111327d5d2e0e387edcfe4493ddac9d63c70 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 12 Apr 2019 11:37:24 +1000 Subject: [PATCH] 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 --- templates/graphite.ssl.vhost.erb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/templates/graphite.ssl.vhost.erb b/templates/graphite.ssl.vhost.erb index ebc13b1..1fb5592 100644 --- a/templates/graphite.ssl.vhost.erb +++ b/templates/graphite.ssl.vhost.erb @@ -9,13 +9,10 @@ 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