From 0ebb5a454d4f9bc133065e11bb7f5cb32177f9a2 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Thu, 4 Feb 2016 14:25:32 -0800 Subject: [PATCH] Fixing what was broken in: 6b95a6ae53e7c4fc74ae830fe4123e3fdf7cb15b This should resolve the following issues: https://github.com/voxpupuli/puppet-module-puppetboard/issues/94 https://github.com/voxpupuli/puppet-module-puppetboard/issues/65 (not 100% sure on this one) --- manifests/init.pp | 8 ++++++-- templates/settings.py.erb | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index deed0f71..299d129a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,7 +44,7 @@ # Defaults to 'None' ($::puppetboard::params::puppetdb_key) # # [*puppetdb_ssl_verify*] -# (string) whether PuppetDB uses SSL or not (true or false) +# (bool, string) whether PuppetDB uses SSL or not (true or false), or the path to the puppet CA # Defaults to false ($::puppetboard::params::puppetdb_ssl_verify) # # [*puppetdb_cert*] @@ -170,7 +170,11 @@ validate_bool($experimental) validate_bool($localise_timestamp) validate_hash($extra_settings) - validate_bool($puppetdb_ssl_verify) + if $puppetdb_ssl_verify { + unless is_string($puppetdb_ssl_verify) { + validate_bool($puppetdb_ssl_verify) + } + } if $manage_group { group { $group: diff --git a/templates/settings.py.erb b/templates/settings.py.erb index ca63c82c..021b2d93 100644 --- a/templates/settings.py.erb +++ b/templates/settings.py.erb @@ -13,8 +13,10 @@ PUPPETDB_HOST = '<%= @puppetdb_host %>' <% if @puppetdb_port -%> PUPPETDB_PORT = <%= @puppetdb_port %> <% end -%> -<% if @puppetdb_ssl_verify -%> +<% if @puppetdb_ssl_verify.is_a? String -%> PUPPETDB_SSL_VERIFY = '<%= @puppetdb_ssl_verify %>' +<% elsif @puppetdb_ssl_verify -%> +PUPPETDB_SSL_VERIFY = True <% else -%> PUPPETDB_SSL_VERIFY = False <% end -%>