Fix ssl key lookup

It seems the scope.lookupvar() doesn't work with non-global variables;
use the @ syntax.  This is copied from puppet-cgit

Change-Id: I38eb50157d25c6c7900a8455eddedb4655c4637d
This commit is contained in:
Ian Wienand 2018-05-21 14:45:39 +10:00
parent c1ca2795c2
commit 0fb8056471
1 changed files with 7 additions and 4 deletions

View File

@ -16,10 +16,13 @@
SSLEngine on
SSLCertificateFile <%= scope.lookupvar("nodepool::builder::ssl_cert_file") %>
SSLCertificateKeyFile <%= scope.lookupvar("nodepool::builder::ssl_key_file") %>
<% if scope.lookupvar("nodepool::builder::ssl_chain_file") != "" %>
SSLCertificateChainFile <%= scope.lookupvar("nodepool::builder::ssl_chain_file") %>
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 %>
<% end %>
DocumentRoot <%= scope.lookupvar("nodepool::builder::build_log_document_root") %>