service "php5-fpm" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
details = node[:accounts][:users][name] || {}
port = 7000 + account["uid"].to_i
- if ["user","administrator"].include?(details[:status])
- user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}"
+ if %w(user administrator).include?(details[:status])
+ user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name}"
if File.directory?("#{user_home}/public_html")
template "/etc/php5/fpm/pool.d/#{name}.conf" do
cluster "9.3/main"
end
- node[:dev][:rails].each do |name,details|
+ node[:dev][:rails].each do |name, details|
database_name = details[:database] || "apis_#{name}"
site_name = "#{name}.apis.dev.openstreetmap.org"
rails_directory = "/srv/#{name}.apis.dev.openstreetmap.org"
end
else
apache_site site_name do
- action [ :delete ]
+ action [:delete]
end
directory rails_directory do
template "apache.apis.erb"
end
- node[:postgresql][:clusters].each do |name,details|
+ node[:postgresql][:clusters].each_key do |name|
postgresql_munin name do
cluster name
database "ALL"