From 20cbe02a05353ecc1ff25953f3f74a1705044b5c Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Thu, 9 Jun 2016 11:30:19 +0200 Subject: [PATCH] Support HTTPS for Grafana resources This change fixes the issue #86. --- lib/puppet/provider/grafana.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/puppet/provider/grafana.rb b/lib/puppet/provider/grafana.rb index b28a84913..d1cfc47ab 100644 --- a/lib/puppet/provider/grafana.rb +++ b/lib/puppet/provider/grafana.rb @@ -78,7 +78,9 @@ def send_request(operation="GET", path="", data=nil, search_path={}) request.basic_auth resource[:grafana_user], resource[:grafana_password] end - return Net::HTTP.start(self.grafana_host, self.grafana_port) do |http| + return Net::HTTP.start(self.grafana_host, self.grafana_port, + :use_ssl => self.grafana_scheme == 'https', + :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http| http.request(request) end end