Remove 12.04 support in web cookbook
authorTom Hughes <tom@compton.nu>
Fri, 29 Aug 2014 14:46:31 +0000 (15:46 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 29 Aug 2014 14:46:31 +0000 (15:46 +0100)
cookbooks/web/recipes/backend.rb
cookbooks/web/recipes/cgimap.rb
cookbooks/web/recipes/frontend.rb
cookbooks/web/templates/default/apache.backend.erb
cookbooks/web/templates/default/apache.frontend.erb

index 7dc229e..df22c12 100644 (file)
@@ -26,13 +26,8 @@ web_passwords = data_bag_item("web", "passwords")
 
 apache_module "remoteip"
 apache_module "rewrite"
-
-if node[:lsb][:release].to_f >= 14.04
-  apache_module "proxy"
-  apache_module "proxy_fcgi"
-else
-  apache_module "fastcgi-handler"
-end
+apache_module "proxy"
+apache_module "proxy_fcgi"
 
 apache_site "default" do
   action [ :disable ]
index 8553d6f..4a8ab12 100644 (file)
@@ -40,12 +40,6 @@ cgimap_directory = "#{node[:web][:base_directory]}/cgimap"
 pid_directory = node[:web][:pid_directory]
 log_directory = node[:web][:log_directory]
 
-if node[:lsb][:release].to_f >= 14.04
-  libdir = "/usr/lib/x86_64-linux-gnu"
-else
-  libdir = "/usr/lib"
-end
-
 execute "cgimap-build" do
   action :nothing
   command "make"
@@ -56,7 +50,7 @@ end
 
 execute "cgimap-configure" do
   action :nothing
-  command "./configure --with-fcgi=/usr --with-boost-libdir=#{libdir}"
+  command "./configure --with-fcgi=/usr --with-boost-libdir=/usr/lib/x86_64-linux-gnu"
   cwd cgimap_directory
   user "rails"
   group "rails"
index 7b32ed3..e1adc5d 100644 (file)
@@ -28,10 +28,8 @@ apache_module "expires"
 apache_module "headers"
 apache_module "proxy_http"
 apache_module "proxy_balancer"
-if node[:lsb][:release].to_f >= 14.04
-  apache_module "lbmethod_byrequests"
-  apache_module "lbmethod_bybusyness"
-end
+apache_module "lbmethod_byrequests"
+apache_module "lbmethod_bybusyness"
 apache_module "rewrite"
 
 apache_site "default" do
index fb23055..6128b32 100644 (file)
   #
   # Pass supported calls to cgimap
   #
-<% if node[:lsb][:release].to_f >= 14.04 -%>
   RewriteRule ^/api/0\.6/map$ fcgi://127.0.0.1:8000$0 [P]
-<% else -%>
-  RewriteRule ^/api/0\.6/map$ - [H=fcgi:127.0.0.1:8000]
-<% end -%>
   RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
-<% if node[:lsb][:release].to_f >= 14.04 -%>
   RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+$ fcgi://127.0.0.1:8000$0 [P]
   RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full$ fcgi://127.0.0.1:8000$0 [P]
   RewriteRule ^/api/0\.6/(nodes|ways|relations)$ fcgi://127.0.0.1:8000$0 [P]
-<% else -%>
-  RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+$ - [H=fcgi:127.0.0.1:8000]
-  RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full$ - [H=fcgi:127.0.0.1:8000]
-  RewriteRule ^/api/0\.6/(nodes|ways|relations)$ - [H=fcgi:127.0.0.1:8000]
-<% end -%>
 </VirtualHost>
 <% end -%>
-<% if node[:lsb][:release].to_f >= 14.04 -%>
 
 <Directory <%= node[:web][:base_directory] %>/rails/public>
   Require all granted
 </Directory>
-<% end -%>
index d82b7e1..bcb9af0 100644 (file)
   RedirectPermanent /events.ics http://calendar.openstreetmap.org.uk/events.ics
   RedirectPermanent / http://www.openstreetmap.org/
 </VirtualHost>
-<% if node[:lsb][:release].to_f >= 14.04 -%>
 
 <Directory <%= node[:web][:base_directory] %>/rails/public>
   Require all granted
 <Directory /store/rails/attachments>
   Require all granted
 </Directory>
-<% end -%>