Skip to content

Commit

Permalink
Merge pull request #51 from everything2/issue/49/dev_environment_snak…
Browse files Browse the repository at this point in the history
…eoil_cert

Snakeoil for dev
  • Loading branch information
jaybonci committed Mar 12, 2017
2 parents d748900 + a416e7a commit be5243e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vagrant/cookbooks/e2web/recipes/default.rb
Expand Up @@ -97,6 +97,17 @@
end
end

if node["e2web"]["tls_cert"].nil? and node["e2web"]["tls_key"].nil?
bash "Create E2 snakeoil certs" do
cwd "/tmp"
user "root"
creates "/etc/apache2/e2.key"
code <<-EOH
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -batch -keyout /etc/apache2/e2.key -out /etc/apache2/e2.cert -subj '/C=US/ST=MA/L=Maynard/O=Everything2.com/OU=edev/CN=vagranttest.everything2.com'
EOH
end
end

file '/etc/logrotate.d/apache2' do
action "delete"
notifies :reload, "service[apache2]", :delayed
Expand Down

0 comments on commit be5243e

Please sign in to comment.