Skip to content

Instantly share code, notes, and snippets.

@williamsjj
Created July 7, 2011 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save williamsjj/1070755 to your computer and use it in GitHub Desktop.
Save williamsjj/1070755 to your computer and use it in GitHub Desktop.
["cert1", "cert2"].each do |cert|
cookbook_file "#{node[:nginx][:dir]}/ssl/#{cert}" do
owner node[:nginx][:user]
mode "0600"
source "ssl/#{cert}"
notifies :run, "execute[add chain certificate #{cert}]"
notifies :restart, "service[nginx]"
end
execute "add chain certificate #{cert}" do
action :nothing
command "cat #{node[:nginx][:dir]}/ssl/#{cert} #{chain_cert} > #{node[:nginx][:dir]}/ssl/composite-#{cert}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment