]> git.openstreetmap.org Git - chef.git/commitdiff
Use the tile.openstreetmap.org certificate for the GPS tile server
authorTom Hughes <tom@compton.nu>
Tue, 22 Oct 2013 19:32:46 +0000 (20:32 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 22 Oct 2013 19:37:38 +0000 (20:37 +0100)
cookbooks/apache/attributes/default.rb
cookbooks/apache/recipes/ssl.rb
cookbooks/apache/templates/default/ssl.erb
roles/gps-tile.rb

index 73184f049563b0ad388689f0341cff0bd3cfa44b..41779d7d7f40c299b5f0ffa5b0ad884006c06c88 100644 (file)
@@ -27,3 +27,5 @@ default[:apache][:event][:threads_per_child] = 25
 default[:apache][:event][:max_requests_per_child] = 0
 
 default[:apache][:listen_address] = "*"
+
+default[:apache][:ssl][:certificate] = "openstreetmap"
index 0841ff0a9698dc5fe75e5ee883f1451aea5b73c5..b32c11c8b5eeaa7ef65c3c32747a591001879c72 100644 (file)
@@ -17,7 +17,9 @@
 # limitations under the License.
 #
 
-node.default[:ssl][:certificates] = node[:ssl][:certificates] | [ "openstreetmap" ]
+certificate = node[:apache][:ssl][:certificate]
+
+node.default[:ssl][:certificates] = node[:ssl][:certificates] | [ certificate ]
 
 include_recipe "apache"
 include_recipe "ssl"
@@ -29,12 +31,13 @@ template "/etc/apache2/conf.d/ssl" do
   owner "root"
   group "root"
   mode 0644
+  variables :certificate => certificate
   notifies :reload, resources(:service => "apache2")
 end
 
 service "apache2" do
   action :nothing
   subscribes :restart, resources(:cookbook_file => "/etc/ssl/certs/rapidssl.pem")
-  subscribes :restart, resources(:cookbook_file => "/etc/ssl/certs/openstreetmap.pem")
-  subscribes :restart, resources(:file => "/etc/ssl/private/openstreetmap.key")
+  subscribes :restart, resources(:cookbook_file => "/etc/ssl/certs/#{certificate}.pem")
+  subscribes :restart, resources(:file => "/etc/ssl/private/#{certificate}.key")
 end
index 9e91555c0106e6c4c51aa625ea35a75d8719892d..8035d4289e08719ac51eefacf5eb257bcd7a7b8d 100644 (file)
@@ -3,6 +3,6 @@
 SSLHonorCipherOrder On
 SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
 
-SSLCertificateFile /etc/ssl/certs/openstreetmap.pem
-SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key
+SSLCertificateFile /etc/ssl/certs/<%= @certiifcate %>.pem
+SSLCertificateKeyFile /etc/ssl/private/<%= @certiifcate %>.key
 SSLCertificateChainFile /etc/ssl/certs/rapidssl.pem
index c4aba9dbd2fdb3dd52f8d410db96e8e7af49d630..2e26ed85cf18386db0efa92588ad458781a46c3e 100644 (file)
@@ -10,6 +10,11 @@ default_attributes(
         :members => [ :enf, :tomh ]
       }
     }
+  },
+  :apache => {
+    :ssl => {
+      :certificate => "tile.openstreetmap"
+    }
   }
 )