Skip to content

Instantly share code, notes, and snippets.

@cheeseplus
Created March 20, 2015 17:46
Show Gist options
  • Save cheeseplus/3d0a6ddc8537445a30dc to your computer and use it in GitHub Desktop.
Save cheeseplus/3d0a6ddc8537445a30dc to your computer and use it in GitHub Desktop.
package "nginx" do
action :install
end
directory "/srv/mywebsite" do
owner "www-data"
group "www-data"
mode "0755"
action :create
end
cookbook_file "index.html" do
path "/srv/mywebsite/index.html"
owner "www-data"
group "www-data"
mode "0755"
action :create
end
template "/etc/nginx/conf.d/mywebsite.conf" do
source "mywebsite.conf.erb"
notifies :reload, 'service[nginx]', :immediately
end
service "nginx" do
action [ :enable, :start ]
supports :reload => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment