Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add ssl cert combined with key for haproxy

  • Loading branch information...
commit b7ab03ffff7e7dd76dbd991330760188d2f2da18 1 parent 1aaed3a
@jsierles authored
Showing with 14 additions and 4 deletions.
  1. +14 −4 ssl_certificates/definitions/ssl_certificate.rb
View
18 ssl_certificates/definitions/ssl_certificate.rb
@@ -11,7 +11,7 @@
template "#{node[:ssl_certificates][:path]}/#{name}.crt" do
source "cert.erb"
- mode "0640"
+ mode "0644"
cookbook "ssl_certificates"
owner "root"
group "www-data"
@@ -20,7 +20,7 @@
template "#{node[:ssl_certificates][:path]}/#{name}.key" do
source "cert.erb"
- mode "0640"
+ mode "0644"
cookbook "ssl_certificates"
owner "root"
group "www-data"
@@ -29,7 +29,7 @@
template "#{node[:ssl_certificates][:path]}/#{name}_combined.crt" do
source "cert.erb"
- mode "0640"
+ mode "0644"
cookbook "ssl_certificates"
owner "root"
group "www-data"
@@ -37,10 +37,20 @@
variables :cert => cert["cert"], :extra => extra
end
+ template "#{node[:ssl_certificates][:path]}/#{name}_combined_with_key.crt" do
+ source "cert.erb"
+ mode "0644"
+ cookbook "ssl_certificates"
+ owner "root"
+ group "www-data"
+ extra = cert["intermediate"] ? cert["intermediate"]+cert["key"] : cert["key"]
+ variables :cert => cert["cert"], :extra => extra
+ end
+
if cert["intermediate"]
template "#{node[:ssl_certificates][:path]}/#{name}_intermediate.crt" do
source "cert.erb"
- mode "0640"
+ mode "0644"
cookbook "ssl_certificates"
owner "root"
group "www-data"
Please sign in to comment.
Something went wrong with that request. Please try again.