%w{httpd php mysql vim git}.each do |pkg| package pkg do action :install end end %w{httpd mysqld}.each do |svc| service svc do supports :status => true, :restart => true, :reload => true action [ :enable , :start ] end end group 'www' do members ['ec2-user'] action :create end directory '/var/www/' do owner 'root' group 'www' mode '0755' action :create end