Skip to content

Instantly share code, notes, and snippets.

@mohitsethi
Created September 13, 2015 06:19
Show Gist options
  • Select an option

  • Save mohitsethi/90606ada2869bb242126 to your computer and use it in GitHub Desktop.

Select an option

Save mohitsethi/90606ada2869bb242126 to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: apache2
# Recipe:: default
#
# Copyright (c) 2015 The Authors, All Rights Reserved.
execute "update apt cache" do
command "sudo apt-get update -y"
end
package "apache2"
service "apache2" do
action [ :start, :enable ]
end
cookbook_file "/var/www/html/index.html" do
source "index.html"
mode '0644'
end
template "/var/www/html/index.html" do
source "index.html.erb"
variable({
:myuser => "Spring People"
})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment