owner "root"
group "root"
mode 0644
- notifies :reload, resources(:service => "php5-fpm")
+ notifies :reload, "service[php5-fpm]"
end
file "/etc/php5/fpm/pool.d/www.conf" do
action :delete
- notifies :reload, resources(:service => "php5-fpm")
+ notifies :reload, "service[php5-fpm]"
end
package "phppgadmin"
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
group "root"
mode 0644
variables :user => name
- notifies :reload, resources(:service => "php5-fpm")
+ notifies :reload, "service[php5-fpm]"
end
apache_site "#{name}.dev.openstreetmap.org" do
end
end
-if node[:postgresql][:clusters]["9.1/main"]
+if node[:postgresql][:clusters][:"9.1/main"]
postgresql_user "apis" do
cluster "9.1/main"
end
group "apis"
repository details[:repository]
revision details[:revision]
- database_port node[:postgresql][:clusters]["9.1/main"][:port]
+ database_port node[:postgresql][:clusters][:"9.1/main"][:port]
database_name database_name
database_username "apis"
run_migrations true
group "apis"
mode 0644
variables :site => site_name
- notifies :touch, resources(:file => "#{rails_directory}/tmp/restart.txt")
+ notifies :touch, "file[#{rails_directory}/tmp/restart.txt]"
end
apache_site site_name do