Skip to content

Instantly share code, notes, and snippets.

@maraca
Created March 6, 2014 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maraca/9397730 to your computer and use it in GitHub Desktop.
Save maraca/9397730 to your computer and use it in GitHub Desktop.
site :opscode
cookbook 'apt'
cookbook 'nginx'
metadata
source 'https://rubygems.org'
gem 'berkshelf'
name 'hello-world'
maintainer 'Martin Cozzi'
maintainer_email 'martin@cotap.com'
license 'MIT'
description 'Displays hello world when querying localhost:80'
version '0.0.1'
%w{ apt nginx }.each do |cookbook|
depends cookbook
end
supports 'ubuntu'
include_recipe 'apt'
include_recipe 'nginx'
directory '/var/www/nginx-default' do
owner 'www-data'
group 'www-data'
mode '0755'
recursive true
action :create
end
file '/var/www/nginx-default/index.html' do
owner 'www-data'
group 'www-data'
mode '0755'
content 'Hello World from Packer!'
action :create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment