pidファイルをチェックするタイプのmonit.confを一気に作りたいとき。 recipes/defualt.rb service "monit" do action :nothing end common_process = ["ntpd", "sshd", "crond"] common_process.each do |proc| template "/etc/monit.d/#{proc}.conf" do source "monit_template.conf.erb" owner "root" group "root" mode 0644 notifies :restart, "service[monit]" variables ({ :process_name => proc, :pidfile => "/var/run/#{proc}.pid", :program =>