Skip to content

Instantly share code, notes, and snippets.

@vignesh-v3
Created November 19, 2016 17:14
Show Gist options
  • Save vignesh-v3/799dc8470d6b86994a261b7597f99190 to your computer and use it in GitHub Desktop.
Save vignesh-v3/799dc8470d6b86994a261b7597f99190 to your computer and use it in GitHub Desktop.
packagename='apache2'
servicename='apache2'
docroot='/var/www/'
if node['platform']=='amazon'
packagename = 'httpd'
servicename = 'httpd'
docroot= '/var/www/html'
end
package packagename do
action :install
end
service servicename do
action [:enable,:start]
end
template "{#docroot}/index.html" do
source 'index.html.erb'
mode '0644'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment