Skip to content

Instantly share code, notes, and snippets.

@logikal
Last active January 8, 2016 00:25
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 logikal/54d3d604b4e12a4bcce0 to your computer and use it in GitHub Desktop.
Save logikal/54d3d604b4e12a4bcce0 to your computer and use it in GitHub Desktop.
Stackstorm answer file ssl_cert, ssl_key examples. Chef code assumes you have your preferred cert and key on disk somewhere already.
---
st2_ssl_cert: ! '-----BEGIN CERTIFICATE-----
LINE 1
LINE 2
LINE 3
LINE 4
....
-----END CERTIFICATE-----
'
st2_ssl_key: ! '-----BEGIN RSA PRIVATE KEY-----
LINE 1
LINE 2
LINE 3
....
-----END RSA PRIVATE KEY-----
'
file node['sendgrid_stackstorm']['answers_file'] do
owner 'root'
group 'root'
mode 00600
action :create
content lazy {
{
'st2::version' => node['st2_version'],
'hubot::chat_alias' => node['hubot_hipchat_chat_alias'],
'hubot::adapter' => 'hipchat',
'hubot::env_export' => {
'HUBOT_HIPCHAT_JID' => node['hubot_hipchat_jid'],
'HUBOT_HIPCHAT_PASSWORD' => node['hubot_hipchat_password']
},
'st2_ssl_cert' => File.read("#{node['ssl_cert_path']}/#{node['ssl_cert_name']}.crt"),
'st2_ssl_key' => File.read("#{node['ssl_cert_path']}/#{node['ssl_cert_name']}.key")
}.to_yaml
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment