]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dev/recipes/default.rb
Add render.openstreetmap.org as an alias on render servers
[chef.git] / cookbooks / dev / recipes / default.rb
index 33de91afbd091b5acc9e36061edf4a41d90bbf64..b96f9291e342d5566704e77cbb062d44a58d2a56 100644 (file)
@@ -103,9 +103,12 @@ apache_site "phppgadmin.dev.openstreetmap.org" do
   template "apache.phppgadmin.erb"
 end
 
-node[:accounts][:users].each do |name,details|
+search(:accounts, "*:*").each do |account|
+  name = account["id"]
+  details = node[:accounts][:users][name] || {}
+
   if ["user","administrator"].include?(details[:status])
-    user_home = details[:home] || "#{node[:accounts][:home]}/#{name.to_s}"
+    user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}"
 
     if File.directory?("#{user_home}/public_html")
       template "/etc/php5/fpm/pool.d/#{name}.conf" do